开发者

hibernate remove duplication from hql

开发者 https://www.devze.com 2023-03-31 08:35 出处:网络
this is a question following hibernate what is the right way to load object graph the answer correctly do the work. but because I can not use set(I need order)开发者_StackOverflow中文版 and trying to

this is a question following hibernate what is the right way to load object graph the answer correctly do the work. but because I can not use set(I need order)开发者_StackOverflow中文版 and trying to avoid treeSet, I use the list in the GrandCat and Cat class. when I use the query, the cat number is not right, instead of 3, it gives me 4. any good way to eliminate this? it has 2 fay Cat in the list.


select distinct c from Cat as c ....

See this.

0

精彩评论

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