add a comment on flush mode
git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@18161 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
parent
084d84b8f8
commit
e71c0e4ba4
|
@ -492,6 +492,12 @@ public abstract class AbstractEntityManagerImpl implements HibernateEntityManage
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Hibernate can be set in various flush modes that are unknown to
|
||||
* JPA 2.0. This method can then return null.
|
||||
* If it returns null, do em.unwrap(Session.class).getFlushMode() to get the
|
||||
* Hibernate flush mode
|
||||
*/
|
||||
public FlushModeType getFlushMode() {
|
||||
FlushMode mode = getSession().getFlushMode();
|
||||
if ( mode == FlushMode.AUTO ) {
|
||||
|
@ -501,7 +507,7 @@ public abstract class AbstractEntityManagerImpl implements HibernateEntityManage
|
|||
this.flushModeType = FlushModeType.COMMIT;
|
||||
}
|
||||
else {
|
||||
return null; //TODO exception?
|
||||
return null;
|
||||
}
|
||||
//otherwise this is an unknown mode for EJB3
|
||||
return flushModeType;
|
||||
|
|
Loading…
Reference in New Issue