Hi,
I have a 1:1 relationship between person and address. Person is the owner of the rel, contains the foreign key. When I refresh the address, I get an exception, see below for further details.
Any ideas?
Hibernate version:
Annotations: 3.2.0 CR1, 13.05.2006
Core: 3.2 cr2
EntityManager: 3.2.0.CR1, 13.05.2006
Code between sessionFactory.openSession() and session.close():
EntityManager em = emf.createEntityManager();
address.setPerson(person);
person.setHomeAddress(address);
em.persist(address);
em.persist(person);
em.getTransaction().begin();
em.getTransaction().commit();
em.clear();
em.merge(address);
Full stack trace of any exception that occurs:
org.hibernate.PropertyAccessException: could not get a field value by reflection getter of com.fineos.ta3g.jpa.datatypes.EntityOid.c
at org.hibernate.property.DirectPropertyAccessor$DirectGetter.get(DirectPropertyAccessor.java:35)
at org.hibernate.tuple.AbstractComponentTuplizer.getPropertyValue(AbstractComponentTuplizer.java:58)
at org.hibernate.tuple.AbstractComponentTuplizer.getPropertyValues(AbstractComponentTuplizer.java:64)
at org.hibernate.tuple.PojoComponentTuplizer.getPropertyValues(PojoComponentTuplizer.java:76)
at org.hibernate.type.ComponentType.getPropertyValues(ComponentType.java:307)
at org.hibernate.type.ComponentType.getHashCode(ComponentType.java:158)
at org.hibernate.engine.EntityUniqueKey.generateHashCode(EntityUniqueKey.java:63)
at org.hibernate.engine.EntityUniqueKey.<init>(EntityUniqueKey.java:44)
at org.hibernate.type.EntityType.loadByUniqueKey(EntityType.java:352)
at org.hibernate.type.EntityType.resolve(EntityType.java:306)
at org.hibernate.type.EntityType.replace(EntityType.java:207)
at org.hibernate.type.TypeFactory.replace(TypeFactory.java:431)
at org.hibernate.event.def.DefaultMergeEventListener.copyValues(DefaultMergeEventListener.java:282)
at org.hibernate.event.def.DefaultMergeEventListener.entityIsDetached(DefaultMergeEventListener.java:246)
at org.hibernate.event.def.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:99)
at org.hibernate.event.def.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:51)
at org.hibernate.impl.SessionImpl.fireMerge(SessionImpl.java:679)
at org.hibernate.impl.SessionImpl.merge(SessionImpl.java:663)
at org.hibernate.impl.SessionImpl.merge(SessionImpl.java:667)
at org.hibernate.ejb.AbstractEntityManagerImpl.merge(AbstractEntityManagerImpl.java:201)
... 18 more
|