Hibernate 3.5 抛出“org.dom4j.DocumentException:文档 http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd 第 1 行错误”
我的 Hypersistence Optimizer 代码库中有一些 Hibernate 3.5 测试,现在我收到了这个奇怪的错误: org.hibernate.InvalidMappingException: Could no…
Hibernate 3 null异常,join fetch查询
我的搜索查询有问题。 我的模型: 项目: @Entity @Table(name = "project") public class Project { @Id @Column(name = "id") @GeneratedValue priv…
Hibernate 根据日期添加序列
我在 Sql Server 上有这个表 id intjournal_date datetimesequence int 我想做的是根据日期时间值生成一个序列。 数据库示例 | id | journal_date | s…
未找到 JDBC 驱动程序类:com.mysql.jdbc.Driver
我正在使用 maven spring 和 hibernate 开发一个 Web 应用程序,我需要使用 hibernate 创建模式,在我的 pom.xml 中有以下内容来连接到 MySQL 5.5 数…
枚举类型 Hibernate 3
我正在开始使用 Hibernate,并且对于应该具有枚举类型的实体,我收到以下错误。 java.lang.IllegalArgumentException: No enum const class app.entit…
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException:未知列
我有两个表 Student 和 Address。我在这里使用 hibernate 3 注释。 我的学生类 package net.viralpatel.contact.form; import javax.persistence.Casc…
Hibernate Query API - 映射中键的属性标准
假设我有这样的模型: public class ProjectModel { ... private Map usersRelations = new HashMap(); } 在 hbm 中映射如下: ... ... 我如何使用 Hi…
Hibernate 3.5 注释
下面的注释在将其应用于字段时有效: @OneToMany(targetEntity=TestMany.class, cascade=CascadeType.ALL, fetch=FetchType.EAGER) @JoinColumn(name=…
使用 JPA 纯方法的 Spring
我对 Spring 和 JPA 有疑问。基本上,我尝试以纯粹的方法或更好的方式将 JPA 与 Spring 结合使用,而不在代码中显式引用 Spring 框架(@Transactional…
何时在 Spring 和 Hibernate 中使用事务?
升级我的项目我在这里考虑交易。 好吧,问题是我不太确定何时应该在 Spring 中使用事务进行 Hibernate 查询。 并不是说我完全不明白什么是交易,我想…
如何让服务在Spring中使用特定的txAdvice?
我正在尝试升级我的项目,因此我开始进行交易。到目前为止我就是这样做的。 PROPAGATION_SUPPORTS PROPAGATION_SUPPORTS PROPAGATION_REQUIRED PROPAG…
为什么我的代码没有迭代 Hibernate 查询结果集?
我向 Hibernate 发出一个查询,它返回一个包含 25 个元素的列表。然后我迭代列表以打印出每个元素。问题在于它打印了第一个元素 25 次,而不是迭代这…
Hibernate 从另一个会话获取 Collection
您好,我收到了臭名昭著的“没有会话或会话已关闭”的消息,我知道这是因为我试图在另一个会话中调用休眠持久对象的集合,那么有没有一种方法可以实际…
Hibernate:org.hibernate.AssertionFailure:com.xxx.Bean 条目中的 null id
我遇到以下错误: com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract void com.xxx.Service.save(com.xxx.Bean)…