@ -14,7 +14,7 @@ export class SprinklersDevice implements ISprinklersDevice {
@Column()
name: string = "";
@ManyToMany(type => User)
@ManyToMany(type => User, user => user.devices)
users: User[] | undefined;
constructor(data?: Partial<SprinklersDevice>) {
@ -29,7 +29,7 @@ export class User implements IUser {
passwordHash: string = "";
@ManyToMany(type => SprinklersDevice)
@ManyToMany(type => SprinklersDevice, device => device.users)
@JoinTable({ name: "user_sprinklers_device" })
devices: SprinklersDevice[] | undefined;