Is it valid for Hibernate list() to return duplicates?

后端 未结 4 708
-上瘾入骨i
-上瘾入骨i 2020-12-09 08:35

Is anyone aware of the validity of Hibernate\'s Criteria.list() and Query.list() methods returning multiple occurrences of the same entity?

4条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-09 08:48

    Yes, getting duplicates is perfectly possible if you construct your queries so that this can happen. See for example Hibernate CollectionOfElements EAGER fetch duplicates elements

提交回复
热议问题