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

Class Book

tests/sqlite-constraints.test.ts:14–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12}
13
14@Entity()
15class Book {
16 @PrimaryKey({ type: 'string' })
17 id!: string;
18
19 @Property({ type: 'string' })
20 name!: string;
21
22 @ManyToOne(() => Author, { ref: true })
23 author!: Ref<Author>;
24}
25
26async function createEntities(em: EntityManager) {
27 const author = new Author();

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected