« Return to Thread: Uregntly need help for thesis: Batch reading of collection with lazy OneToOne relation

Re: Uregntly need help for thesis: Batch reading of collection with lazy OneToOne relation

by Frank Schwarz :: Rate this Message:

Reply to Author | View in Thread

Hi Mario,

the query key has to be defined on Partner pointing to Employee instead of Role. Please have a look at http://code.google.com/p/oopex/source/browse/trunk/modules/eclipselink1-jpa/src/queries-downcasts/java/oopex/eclipselink1/jpa/queries/DowncastsMain.java#139. I never tried this for defining Join-Reads/Batch-Reads, though.

@Tom: Using downcasts in queries is, from my point of view, something quite natural if you design your model in a truly object oriented way. Reiterating that this feature nobody is needing, does not make disappear. The other feature, Mario is looking for, might be called "fetch-plans/plans" - as in the old JDO days ;-). See http://wiki.eclipse.org/EclipseLink/Development/JPA/NestedFetchGroups, last item in the open issues list. Also this feature(-request) I see frequently in projects when there is a CRUD-style rich client.

-- Frank

Meet me at JFS2009 http://www.java-forum-stuttgart.de/

Mario Sandro Schwarz wrote:
I did already try it with a customizer based on the workaround from Doug
Clarke "Accessing un-mapped attributes using QueryKey "
(http://wiki.eclipse.org/EclipseLink/Development/JPA/QueryDownCast). The
role entity class was annotated with this Customizer:

 « Return to Thread: Uregntly need help for thesis: Batch reading of collection with lazy OneToOne relation