Joined: Mon Oct 01, 2012 5:58 pm Posts: 1
|
I have 3 entities and nested collections of them as follows: Entity A contains collection of B Entity B contains collection of C
And I need to fetch a list of full object graphs of entity A. When I set fetching strategy to "subselect" both for collection of B and collection of C, actually only collection of B is read via single query. Each collection of C is read via separate query per each entity of type B - the same as if fetching strategy was "select" there.
So I expect the following: select ... from A select ... from B where a_id in (select id from A) select ... from C where b_id in (select id from B where a_id in (select id from A))
But actually get: select ... from A select ... from B where a_id in (select id from A) select ... from C where b_id = ? select ... from C where b_id = ? ... select ... from C where b_id = ?
Are there any limitations on nested subselects?
|
|