Joined: Mon Apr 08, 2013 10:48 pm Posts: 1
|
Hibernate 4.0.1 DB: MySql
I'm using @Generated(GenerationTime.XXX) annotation for createdOn and modifiedOn columns. After saving or updating the entity hibernate immediately executes SELECT statements to get these generated values from DB.
Is there any way to avoid this SELECT? or it would be even better to have it lazily executable.
Most of the time execution logic as follows (for example, creation of an Account): 1. Create Object entity 2. Fill the properties 3. Persist it to DB.
That's it. But in the logs i always see this SELECT statement at the end. Which is useless by this time. And may affect the performance.
Thank you.
|
|