A batch is trying to consult a record of the database to later update it, but simultaneously the user modifies that same record and manages to commit, since the batch was already executing query and obtains the old record (cache first level) and overwrite what the user updated.
How can I make the search of the batch force search the database?
Query that performs the batch:
ChildLineDTO result = childLineDAO.find(entityId);
Metodo find:
K entityFind = (K) getHibernateTemplate().get(class1, entityId);