On Jan 30, 2012, at 12:13 PM, Aristedes Maniatis wrote: > Isn't this just a bug in the old DISJOINT approach rather than a new type of > prefetch? What is the use-case for fetching all related records in the > database when you have a fetch limit?
This is not a bug, rather a limitation of the algorithm. DISJOINT approach is based on the root query qualifier transposed for the related entity. It has no way of knowing which root objects will get below the fetch limit. Root: SELECT * FROM ARTIST WHERE ARTIST_NAME LIKE 'X%' FETCH LIMIT 10; Prefetch SELECT PAINTING.* FROM PAINTING JOIN ARTIST ON (..) WHERE ARTIST.ARTIST_NAME LIKE 'X%' FETCH LIMIT ???? Andrus
