Hi!
I use a stateless session to insert an entity which has a @ManyToOne reference. I can secure that the referenced object is persisted, so the id will be valid. This works fine except the referenced instance is cglib enhanced.
with enhanced classes I get:
Code:
org.hibernate.HibernateException: instance not of expected entity type: com.ecg.mts.tsm.impl.domain.TimeSeries$$EnhancerByCGLIB$$e9841ce8 is not a: com.ecg.mts.tsm.impl.domain.TimeSeries
Well, if I use a normal Session this works. The statless session is not aware of enhanced types. Is there a reason for this?
regards