pg
pg copied to clipboard
Inheritance like hibernet
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/
Please format the example in your issue using markdowns code feature: https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet#code