Thanks for reply, reason of keeping insert and update as false is: value of inserted column is initialized from some other property [Super class] that maps to the same column(s) value of updated column is initialized from a DB trigger
About updated column i have found the root cause and would be fixed. For inserted column here is what the problem is, we have overwritten a org.cfg.Configuration.java in our product which does hibernate configuration and schema generation for us, there are lot of tables which have this inserted and updated columns in our product, some of them are working fine and getting populated with correct date in these two columns, some of them are not.
Reason for those who are getting NULL value for these columns is: inserted column has a type of "timestamp". Whereas those tables who are fine, have the type as "date"... I read that "Hibernate cannot know if the property, which is of java.util.Date, should map to a SQL date, timestamp, or time column....." Is there any way to make sure that type to be "date"
|