Última actividad 1729145814

Revisión 6af8d850119f0620eed9f7f17ed13d3ad87f54f2

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