hi,
i had declared a element in my hbm.xml to generate, however, when insert and update is execute. I cannot see any date value but null instead.
my elements is same almost same like the one in hibernate in action.
<property name="lastModified"
update="false"
insert="false"
generated="always"/>
it will generated Datetime Type for MYSQL. but when i change to timestamp, it work like what i though (every insert and update is generated the date value).
am my mapping is incorrect ?
i receive this error
2008-06-05 18:44:14,942 WARN [org.hibernate.util.JDBCExceptionReporter] - <SQL Error: 1364, SQLState: HY000>
2008-06-05 18:44:14,942 ERROR [org.hibernate.util.JDBCExceptionReporter] - <Field 'lastModified' doesn't have a default value>
org.hibernate.exception.GenericJDBCException: could not insert: [com.XXX.ClassName]
....... //other exceptin
_________________ happy hacking !
|