typeorm field relation not showing typeorm field relation not showing

The solution for “typeorm field relation not showing typeorm field relation not showing” can be found here. The following code will assist you in solving the problem.

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

@ManyToOne((type) => User, { eager: true })
public user: User;
} @Entity()
export class Photo extends RootEntity {
@PrimaryGeneratedColumn()
public id: string;

@Column()
public userId: number;

@ManyToOne((type) => User)
public user: User;
}

Thank you for using DeclareCode; We hope you were able to resolve the issue.

More questions on [categories-list]

0
inline scripts encapsulated in