Son aktif 1729145740

knox revised this gist 1729145740. Go to revision

1 file changed, 17 insertions

TypeORM-readme-31.ts(file created)

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