Answers for "typeorm field relation not showing"

0

typeorm field relation not showing

@Entity()
        export class Photo extends RootEntity {
            @PrimaryGeneratedColumn()
            public id: string;

            @ManyToOne((type) => User, { eager: true })
            public user: User;
        }
Posted by: Guest on January-24-2022
0

typeorm field relation not showing

@Entity()
        export class Photo extends RootEntity {
            @PrimaryGeneratedColumn()
            public id: string;

            @Column()
            public userId: number;

            @ManyToOne((type) => User)
            public user: User;
        }
Posted by: Guest on January-24-2022

Code answers related to "TypeScript"

Browse Popular Code Answers by Language