gpt4 book ai didi

java - Hibernate 支持哪些不同的集合

转载 作者:行者123 更新时间:2023-12-01 14:03:44 24 4
gpt4 key购买 nike

Hibernate 支持哪些不同的集合,例如

  1. 列表 --> ArrayList、LinkedList 等
  2. 集合 --> Treeset、HashSet 等
  3. Map --> HashMap 等

并告诉我哪些集合不支持以及如何实现它们?

最佳答案

根据Hibernate documentation :

" The persistent collections injected by Hibernate behave like HashMap, HashSet, TreeMap, TreeSet or ArrayList, depending on the interface type."

请注意,它们的行为类似于这些类,但它们实际上是 Hibernate 特定的集合类。

<小时/>

And tell me which are collections not supported and how to achieve them?

您的意思是:1)上面列表中没有的任何类,2)除非您愿意修改核心 Hibernate 代码库,否则您不能。

关于java - Hibernate 支持哪些不同的集合,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19110078/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com