I'm getting an NPE if I have a true OneToOne bidirectional and the @PrimaryKeyJoinColumn class gets processed after the side with mappedBy=.
The error occurs on this line:
Code:
if ( otherSideProperty.getValue() instanceof OneToOne ) {
in OneToOneSecondPass.java because otherSideProperty is null.
Changing the order of the classes handed to AnnotationConfiguration works around the problem.
Should I submit a JIRA issue?
Hibernate version: 3.2.0.cr4
Hibernate Annotations version: 3.2.0.cr2
Partial stack trace:
Caused by: java.lang.NullPointerException
at org.hibernate.cfg.OneToOneSecondPass.doSecondPass(OneToOneSecondPass.java:135)
at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1054)
at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:296)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1210)
at com.anystream.acm.tx.impl.SessionCreatorFactory.buildSessionFactory(SessionCreatorFactory.java:117)
at com.anystream.acm.tx.impl.SessionCreatorFactory.buildSessionCreator(SessionCreatorFactory.java:84)
at com.anystream.acm.tx.impl.SessionCreatorFactory.createCoreServiceImplementation(SessionCreatorFactory.java:46)