pg icon indicating copy to clipboard operation
pg copied to clipboard

Inheritance like hibernet

Open suren4Kites opened this issue 4 years ago • 1 comments

Well I saw an issue already: https://github.com/go-pg/pg/issues/885 Ive something like below: type Actor struct { Id int Profile Profile ProfileId int }

type Singer struct { Id int Profile Profile ProfileId int }

type Profile struct { Id int }

And another table type MyTable struct { Profile Profile }

where this profile can be Singer or Actor, how can I achieve this, please provide example. Something like this in hibernate : https://thoughts-on-java.org/complete-guide-inheritance-strategies-jpa-hibernate/

suren4Kites avatar Oct 21 '19 15:10 suren4Kites

Please format the example in your issue using markdowns code feature: https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet#code

elliotcourant avatar Oct 24 '19 18:10 elliotcourant