Beginner |
|
Joined: Tue Jan 18, 2005 6:44 pm Posts: 39
|
hi,
I have a one to many association setup as a parent child relationship. The many side maybe populated at any point in time. If I execute a getCriteria operation based on the primary key on the parent before I populate the child table I get the following error:
org.hibernate.PropertyAccessException: exception getting property value with CGLIB (set hibernate.cglib.use_reflection_optimizer=false for more info) getter of com.siVault.siForms.BusinessObjects.FormPage.?
at org.hibernate.tuple.PojoComponentTuplizer.getPropertyValues(PojoComponentTuplizer.java:42)
at org.hibernate.type.ComponentType.getPropertyValues(ComponentType.java:257)
at org.hibernate.type.ComponentType.getHashCode(ComponentType.java:158)
at org.hibernate.engine.EntityKey.getHashCode(EntityKey.java:68)
at org.hibernate.engine.EntityKey.<init>(EntityKey.java:41)
at org.hibernate.loader.Loader.registerNonExists(Loader.java:512)
at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:287)
at org.hibernate.loader.Loader.doQuery(Loader.java:384)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:203)
at org.hibernate.loader.Loader.loadEntity(Loader.java:1255)
at org.hibernate.loader.entity.EntityLoader.load(EntityLoader.java:139)
at org.hibernate.loader.entity.EntityLoader.load(EntityLoader.java:124)
at org.hibernate.persister.entity.BasicEntityPersister.load(BasicEntityPersister.java:2453)
at org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:387)
at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:368)
at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:166)
at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:140)
at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:249)
at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:123)
at org.hibernate.impl.SessionImpl.get(SessionImpl.java:561)
at org.hibernate.impl.SessionImpl.get(SessionImpl.java:556)
at com.siVault.siForms.BusinessObjects.base._BaseRootDAO.get(_BaseRootDAO.java:269)
at com.siVault.siForms.BusinessObjects.base._BaseRootDAO.get(_BaseRootDAO.java:258)
at com.siVault.siForms.BusinessObjects.base.BaseFasTransactionDAO.get(BaseFasTransactionDAO.java:43)
at com.siVault.siForms.persistence.DBPersistence.getFasTransaction(DBPersistence.java:61)
at com.siVault.siForms.persistence.HibernateDriver.main(HibernateDriver.java:60)
Caused by: java.lang.ClassCastException
at com.siVault.siForms.BusinessObjects.FormPage$$BulkBeanByCGLIB$$ffbe7696.getPropertyValues(<generated>)
at net.sf.cglib.beans.BulkBean.getPropertyValues(BulkBean.java:48)
at org.hibernate.tuple.PojoComponentTuplizer.getPropertyValues(PojoComponentTuplizer.java:39)
... 25 more
Is there a way for it to ignore if the collection is empty or null?
Thanks,
Jeevak
|
|