这里的Java 8和MySQL遇到了一些问题,使得JPA/Hibernate调度验证与我的对象继承模型一起工作。我已经将Hibernate设置为“验证模式”(也就是说,它只应该根据现有的DB结构验证我的Java类及其JPA/Hibernate注释)。DiscriminatorType.STRING)@EqualsAndHashCode(callSuper=false)
public class Organization extends BaseEntit
value ) { }我认为问题在于它使用TeamToStringConverter来转换user_team.user_id字段而不是user_team.team_name字段(在@Column注释中指定),结果是例外:
sql.SqlUtils - Attempted to convert SQLException to SQLException
我的代码在Hibernate 3.6上运行良好,我不确定这是映射问题还是其他问题。我使用Spring3.1.2使用JPA方法配置hibernate 4.1。Caused by: org.hibernate.MappingException: Could not create DynamicParameterizedType for type: org.hibernate.type.EnumTypeat org.hibernate.mapping.Property.isValid(Property.java