Hi,
We have different instance of an application running on each machine.We are using Hibernate with MYSQL DB to persist the data.We have configured to use primary key generation like,
@GenericGenerator(name = "generator", strategy = "increment")
But facing issue when the Instance is started with the DB conncetion created.
THe generator fetches the ID from the First level cache.It does not go to DB to fetch the MAX record.
We tried both Session and StatelessSession but both fetches from First level cache.
Is there any way to configure the Hibernate to goto DB and fetch the MAX ID each time without fetching from 1st level cache. or Refresh the First level cache.
Help is very much needful.
Regards, Uvaraj S
|