Son aktif 1729145776

knox revised this gist 1729145776. Go to revision

1 file changed, 10 insertions

TypeORM-readme-32.ts(file created)

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