|
Re: Query across Variable One to One mapping [message #538463 is a reply to message #537838] |
Mon, 07 June 2010 16:47 |
|
Joins are not supported across VariableOneToOne relationships, so this is not easy to do. Since there are two or more different tables/entities you will need to query or join multiple tables.
One option is to define a OneToOneQueryKey to both of the implementers of the Interface and in your query join both of the query keys. Note that query key support to JPQL was added in EclipseLink 2.1, previously you would need to use an Expression (or Criteria) query to access query keys.
Another option is to use a native SQL query, or switch the mapping to two different OneToOne mappings.
Please log an enhancement request to have support for joining VariableOneToOne relationships and vote for it.
James : Wiki : Book : Blog : Twitter
|
|
|
Powered by
FUDForum. Page generated in 0.03588 seconds