Skip to content

Instantly share code, notes, and snippets.

@SergeyMell
Last active September 14, 2020 05:44
Show Gist options
  • Save SergeyMell/53a89c06fdfd4e1a47186100fcb382f2 to your computer and use it in GitHub Desktop.
Save SergeyMell/53a89c06fdfd4e1a47186100fcb382f2 to your computer and use it in GitHub Desktop.
TypeORM joined tables
@Entity('posts')
export class Post extends BaseEntity {
@PrimaryColumn({
name: 'pk_post',
generated: 'increment',
})
id: number; // <= Should always be `id`
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment