MappedSuperclass « Annotation « JPA Q&A





1. How to Annotate Index on a MappedSuperclass    stackoverflow.com

I have a mapped superclass with two already indexed properties. now i want to create a group index over both properties. until now it worked with:

@MappedSuperclass
Class A {
    ...

2. LazyInitException with Annotations and MappedSuperclass    forum.hibernate.org

090-Processor23] DEBUG org.hibernate.jdbc.JDBCContext - after transaction begin 090-Processor23] DEBUG com.test.service.dao.impl.PhysicalLocationDaoImpl - saving an instance of: class com.test.model.PhysicalLocation$$EnhancerByCGLIB$$ad205672 090-Processor23] ERROR org.hibernate.LazyInitializationException - could not initialize proxy - the owning Session was closed .LazyInitializationException: could not initialize proxy - the owning Session was closed g.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:60) g.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:111) g.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:172) m.test.model.PhysicalLocation$$EnhancerByCGLIB$$ad205672.setLastUpdate() m.test.service.dao.impl.BaseDaoImpl.makePersistent(BaseDaoImpl.java:63) n.reflect.NativeMethodAccessorImpl.invoke0(Native Method) n.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) n.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)