SecondaryTables to allow join multiple tables on non-primary key #5052
Replies: 1 comment
-
The You write non primary key, but I guess you mean understand that this must still be at least a natural id which is unique, right? From what I can see in Overall, I'm not against the idea, but it sure is a lot of work and I doubt that there is anyone else out that requiring this feature, so I'd rather work on something that reaches more people. If anyone else wants to work on this though, I'd gladly guide that person. |
Beta Was this translation helpful? Give feedback.
-
Currently
@SecondaryTables
only support join multiple tables with the same primary key. But in reality we often need the ability to join multiple tables using nested structure based on non-primary keyTake for example the below SQL
Without the ability to use non-primary key in
@SecondaryTables
, I think the current solution is to write@Entity
forb
andc
andd
and useOneToOne
in each of themHowever, if we can use non-primary in
@SecondaryTables
, it would be much simpler. Something along the lines ofBeta Was this translation helpful? Give feedback.
All reactions