java - Hibernate中的bag标签有什么用?

标签 java hibernate orm hibernate-mapping

我需要知道如何使用行李标签以及它的用途是什么?

最佳答案

用于集合映射

If your table does not have an index column, and you still wish to use List as the property type, you can map the property as a Hibernate < bag>. A bag does not retain its order when it is retrieved from the database, but it can be optionally sorted or ordered.

http://docs.jboss.org/hibernate/core/3.3/reference/en/html/collections.html

关于java - Hibernate中的bag标签有什么用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3306833/

相关文章:

java - 字符串常量池中的字符串常量的哈希是如何计算的?

java - 从录音中检测音符

java - 从数据库读取用户的问题

java - ArrayAdapter 不更新动态数据

java - 使用 jsoup 处理网页中的分页

mysql - HSQLDialect 到 MySQL5InnoDBDialect、Hibernate

java - 优化 Spring Boot JPA 查询

javascript - Sequelize 模型的客户端模型验证

java - 在 Hibernate 中正确实现一对多单向关系

.net - 有人使用 Entity Framework *好吧*吗?