Son aktif 1729145740

TypeORM-readme-31.ts Ham
1import {
2 Entity,
3 Column,
4 PrimaryGeneratedColumn,
5 OneToOne,
6 JoinColumn,
7} from "typeorm"
8import { Photo } from "./Photo"
9
10@Entity()
11export class PhotoMetadata {
12 /* ... other columns */
13
14 @OneToOne(() => Photo, (photo) => photo.metadata)
15 @JoinColumn()
16 photo: Photo
17}