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

Class User

tests/features/serialization/GH5138.test.ts:20–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18}
19
20@Entity()
21class User {
22 @PrimaryKey()
23 id!: number;
24
25 @Property()
26 name!: string;
27
28 @ManyToMany({
29 entity: () => Role,
30 pivotEntity: () => UserRole,
31 })
32 roles = new Collection<Role>(this);
33
34 @ManyToOne(() => School, { nullable: true })
35 school?: School;
36}
37
38@Entity()
39class Role {

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected