now, I understand this is not possible, but I can't imagine that it's a problem that is never encountered.
I have two entities in different PUs. I'd like to foreign key from one to the other. I wondered who out there has already encountered this issue, and if they'd found a good solution to it?
EclipseLink supports Composite Persistence Units, that allow relationships across multiple persistence units.
See, http://wiki.eclipse.org/EclipseLink/UserGuide/JPA/Advanced_JPA_Development/Composite_Persistence_Units
Otherwise, you can just map the foreign key as a Basic and query for the objects.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With