I just configured @PersistenceContext(type=PersistenceContextType.EXTENDED) on my DAO classes to get lazy loading working on the view layer (needed to get it not closing the session for this) but I am having issues with 1 level cache (I imagine).. Because the object is cached even with my second level cache settings off. After turned off the "type=PersistenceContextType.EXTENDED" I got the system not caching the object but dived into the lazy loading issues again.
//@PersistenceContext(type=PersistenceContextType.EXTENDED)
@PersistenceContext
private EntityManager entityManager;
Is there any way to control this? I really need lazy loading but don't want to get my object stored on a 1 level cache every time.
thanks