|
After upgrade from 4.2.5 to 4.2.6, our web proj fail to start with the following error:
Caused by: org.hibernate.AnnotationException: Unable to create unique key constraint (product_id, date) on table wealth_product_changes: database column 'product_id' not found. Make sure that you use the correct column name which depends on the naming strategy in use (it may not be the same as the property name in the entity, especially for relational types) at org.hibernate.cfg.Configuration.buildUniqueKeyFromColumnNames(Configuration.java:1623) at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1416) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1865) at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247) at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373) at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1541) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1479) ... 95 more
In which "product_id" is a foreign key annotated with "@ManyToOne(optional = false)" and the same code worked fine before the upgrade. Today we tried the new 4.2.7.SP1 release, the issue persists.
Further, this issue seems to be a regression of
HHH-7890
, I commented on that issue once we encountered the problem, but got no response so far
|