开发者

how to sort explicit loaded records with hibernate

开发者 https://www.devze.com 2023-01-29 23:44 出处:网络
hey guys and gals.i have a system that queries a survey.when i get the survey i have it set with explicit loading so it pulls the questions and the possible answers for those questions.so the tree wou

hey guys and gals. i have a system that queries a survey. when i get the survey i have it set with explicit loading so it pulls the questions and the possible answers for those questions. so the tree would look like this

survey
|_questions
  |_answers

so, my problem i开发者_如何学编程s i need to sort the questions and answers. there is an order field on each of those tables but i can't figure out how to put the "order by sortorder" clause in the query that returns the questions and answers


HAHAHAHA, well bit more digging i found it. order-by= on the set of the mapping file. how simple. sorry guys

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号