Skip to content

Instantly share code, notes, and snippets.

@ktutnik
Created May 3, 2021 03:32
Show Gist options
  • Save ktutnik/47dafceb3e76402141e54edf8c9679f7 to your computer and use it in GitHub Desktop.
Save ktutnik/47dafceb3e76402141e54edf8c9679f7 to your computer and use it in GitHub Desktop.
@Entity()
export class Product {
@PrimaryGeneratedColumn()
id: number;
/** ------ other properties ------ **/
@ManyToOne(x => Category)
category:Category
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment