| 52 | } |
| 53 | |
| 54 | @Entity() |
| 55 | class B { |
| 56 | @PrimaryKey({ type: Number }) |
| 57 | id!: number; |
| 58 | |
| 59 | @OneToOne(() => A, a => a.b, { eager: true }) |
| 60 | a!: A; |
| 61 | |
| 62 | @ManyToOne(() => C, { nullable: true }) |
| 63 | c?: C; |
| 64 | |
| 65 | @Property({ type: String }) |
| 66 | @Check({ expression: c => quote`${c.prop} <> 'data'` }) |
| 67 | prop!: string; |
| 68 | } |
| 69 | |
| 70 | @Embeddable() |
| 71 | class Identity { |