links for 2011-01-03

4 01 2011
  • JPA provides two modes of flushing query objects:AUTO and COMMIT.If the AUTO mode (default) is set on the Query, then any changes made to entity objects will be reflected the very next time when a select query is made(e.g. the persistence engine must make sure to update all the states of the entity objects which will affect the results of a SELECT query.The AUTO flush mode can be set explicitly on the Query by calling setFlushMode().When the flush mode is set to COMMIT,then the persistence engine, may only update all the state of the entities during the database COMMIT.The dirty changes applied to entity objects and then querying for the results of the entities may be unspecified.The method setFlushMode(FlushModeType) is available in both EntityManager and Query interface. If the EntityManager has been configured with setFlushMode(FlushModeType.AUTO) and the Query object has been called with setFlushMode(FlushModeType.COMMIT), then the preference will always goes to the Query object.




Introduce tus datos o haz clic en un icono para iniciar sesión:

Logo de

Estás comentando usando tu cuenta de Cerrar sesión /  Cambiar )

Google+ photo

Estás comentando usando tu cuenta de Google+. Cerrar sesión /  Cambiar )

Imagen de Twitter

Estás comentando usando tu cuenta de Twitter. Cerrar sesión /  Cambiar )

Foto de Facebook

Estás comentando usando tu cuenta de Facebook. Cerrar sesión /  Cambiar )


Conectando a %s

A %d blogueros les gusta esto: