I have an tx boundary method in a typical service which calls a dao to load an entity.
The loading of the entity has to delegate to the underlying JPA implementation because of the filter feature not being in JPA.
The problem is when delegating to the underlying implementation, after the finder the session is flushed and the changes seem to be committed.
The default flush mode is AUTO - do I need to move to a manual flush mode or is this a problem with spring jpa support?
Operations which do not delegate to the underlying do not flush as expected.Code:public Object doInJpa(EntityManager em) throws PersistenceException { Session session = (Session)em.getDelegate(); Filter filter = session.enableFilter("limitByStatus"); . . });


Reply With Quote