-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Medium
-
Affects Version/s: 2.0
-
Component/s: None
In 2.0-RC1, the renaming of the ANCESTORS.POSITION column to ANCESTORS.ANCESTORPOSITION caused the ANCESTORPOSITION to be auto-generated (as expected). However, the problem is that it wasn't added as a primary key. The result of this is duplicate entry errors, like:
org.springframework.dao.DataIntegrityViolationException: (Hibernate operation): data integrity violated by SQL ''; nested exception is java.sql.BatchUpdateException: Duplicate key or integrity constraint violation message from server: "Duplicate entry '482-0' for key 1"
org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.translate(SQLStateSQLExceptionTranslator.java:88)
org.springframework.orm.hibernate.HibernateAccessor.convertJdbcAccessException(HibernateAccessor.java:249)
org.springframework.orm.hibernate.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:231)
org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:205)
org.springframework.orm.hibernate.HibernateTemplate.executeFind(HibernateTemplate.java:220)