How to access Primary Key instance of entity relationship? [message #1064468] |
Wed, 19 June 2013 08:23  |
Eclipse User |
|
|
|
I want to turn entity instances into XML representations using JAXB. For LAZY references, I want to simply contain a URL (made up of the referenced Primary key), so that each XML receiver can decide on his own whether to explicitly load this extra information or not. So I wrote an XmlAdapter to turn relationships into URLs, which works well, but has the drawback, that as soon as I access the LAZY relationship to find out the primary key, certainly it is loaded by the entity manager. This is not nice, as I do not need all this data -- but solely the primary key.
So I wonder whether there is a way to get the primary key of a referenced entity without actually loading its complete state into memory?
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04018 seconds