MCPcopy Create free account
hub / github.com/mikro-orm/mikro-orm / Author

Class Author

tests/features/populate-hints.test.ts:21–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19}
20
21@Entity()
22class Author {
23 @PrimaryKey()
24 id!: number;
25
26 @Property()
27 name!: string;
28
29 @ManyToOne(() => Country)
30 country!: Ref<Country>;
31
32 @OneToMany(() => Book, b => b.author)
33 books = new Collection<Book>(this);
34}
35
36@Entity()
37class Book {

Callers

nothing calls this directly

Calls 5

EntityFunction · 0.90
PrimaryKeyFunction · 0.90
PropertyFunction · 0.90
ManyToOneFunction · 0.90
OneToManyFunction · 0.90

Tested by

no test coverage detected