TypeORM-readme-37.ts
· 173 B · TypeScript
Orginalformat
export class Photo {
// ... other columns
@OneToOne(() => PhotoMetadata, (metadata) => metadata.photo, {
cascade: true,
})
metadata: PhotoMetadata
}
1 | export class Photo { |
2 | // ... other columns |
3 | |
4 | @OneToOne(() => PhotoMetadata, (metadata) => metadata.photo, { |
5 | cascade: true, |
6 | }) |
7 | metadata: PhotoMetadata |
8 | } |