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

Class Post

tests/features/populate-limit.test.ts:40–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38}
39
40@Entity()
41class Post {
42 @PrimaryKey()
43 id!: number;
44
45 @Property()
46 title!: string;
47
48 @Property()
49 createdAt!: Date;
50
51 @ManyToOne(() => User)
52 user!: Ref<User>;
53
54 @OneToMany(() => Comment, c => c.post)
55 comments = new Collection<Comment>(this);
56
57 @ManyToMany(() => Tag)
58 tags = new Collection<Tag>(this);
59}
60
61@Entity()
62class User {

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected