Last active 1729145776

Revision 6da139e90a5bb8b7207e86f066231b25f8b75a6d

TypeORM-readme-32.ts Raw
1import { Entity, Column, PrimaryGeneratedColumn, OneToOne } from "typeorm"
2import { PhotoMetadata } from "./PhotoMetadata"
3
4@Entity()
5export class Photo {
6 /* ... other columns */
7
8 @OneToOne(() => PhotoMetadata, (photoMetadata) => photoMetadata.photo)
9 metadata: PhotoMetadata
10}