Hello gurus,
I have this simple model for testing:
State 1-N City
When I issue the query:
Quote:
from zzz.State
it issues these statements:
Code:
16:17:29,133 DEBUG SQL:237 - select state0_.id as id, state0_.name as name from
zzz_state state0_
16:17:29,148 DEBUG SQL:237 - select cities0_.id as id__, cities0_.state_id as st
ate_id__, cities0_.id as id0_, cities0_.name as name0_, cities0_.state_id as sta
te_id0_ from zzz_city cities0_ where cities0_.state_id=?
16:17:29,148 DEBUG SQL:237 - select cities0_.id as id__, cities0_.state_id as st
ate_id__, cities0_.id as id0_, cities0_.name as name0_, cities0_.state_id as sta
te_id0_ from zzz_city cities0_ where cities0_.state_id=?
and correctly returns the 2 states stored in the database.
However, in order to reduce the SQL queries issued to the database, I'm trying the following query:
Quote:
from zzz.State as state left join fetch state.cities
The issued SQL statement appears to be correct:
Code:
16:17:50,694 DEBUG SQL:237 - select state0_.id as id0_, cities1_.id as id1_, sta
te0_.name as name0_, cities1_.name as name1_, cities1_.state_id as state_id1_, c
ities1_.id as id__, cities1_.state_id as state_id__ from zzz_state state0_ left
outer join zzz_city cities1_ on state0_.id=cities1_.state_id
but
nothing is displayed in Hibern8IDE.
This is the source for zzz.State:
[code]
package zzz;
import java.util.Set;
/**
* zzz_state
*
* @hibernate.class table="zzz_state"
*/
public class State {
private Long id;
private String name;
private Set cities;
/**
* Obt