| Author |
restrict queries in association while fetching data....
|
Bhavin Sanghani
Ranch Hand
Joined: Dec 17, 2003
Posts: 67
|
|
Hi
I want to restrict few queries while fetching the data. I have kept lazy="false" in my code with fetch="subselect" and "join" as appropriate. Now, I want to fetch objects upto one level and at second level except one association i want to discard everything in query. e.g.
In following mapping strucutre, I want to load all QuestionsAnswer with Question & Answer objects only and not Feature which has association in Answer:
Any idea how can I do this?
Thanks,
Bhavin
|
 |
Paul Sturrock
Bartender
Joined: Apr 14, 2004
Posts: 10336
|
|
|
You'll need to map the association to feature as lazy and not eagerly fetch it in your HQL/Criteria.
|
JavaRanch FAQ HowToAskQuestionsOnJavaRanch
|
 |
 |
|
|
subject: restrict queries in association while fetching data....
|
|
|