In JPA (Hibernate) I have a simple data model that has many relationships from one and the other to one:
/ P> <-> City -> State -> Governor -> Nation -> Continent
Where the state is for a state, there is one for the state governor;
I want to get an example of a single town with my unique ID and use it Nbndit state, governor, country and continent want to get the interest. I believe that proper isabil:
choose from city to t Add to t.state s join fetch s.governor g fetch g.nation n Join fetch N.continent c where t.id =? Id
The Hebrewman generates the right SQL from this ejbql, but when I do my town. GetState () GetGovernor () I bring a vacant object back to my governor. Why is not the hibernate governor coming? It seems that it does not want to populate the trees at more than one level. Anyone is watching what I am doing wrong?
No comments:
Post a Comment