Hi all,
When I use hibernate in my spring project the "NOW()" function of my "date_created" fields doesn't seem to work.
I just get a NULL value instead of the NOW() value.
When I insert a row (via my phpMyAdmin) manually it does work ok, and the date_created field gets filled with the NOW() result though.
Code:
INSERT INTO `autopermit`.`family` (
`idfamily` ,
`currently_active` ,
`date_created` ,
`date_modified`
)
VALUES (
NULL , NULL , NOW( ) ,
CURRENT_TIMESTAMP
);
The structure of the table is:
Field Type Null Default
date_modified timestamp No CURRENT_TIMESTAMP
date_created timestamp Yes NULL
Even if the HSQL query doesn't include the date_created, it still places the null value:
Hibernate: insert into autopermit.family (currently_active, date_modified) values (?, ?)
Any idea's why this might be happening?
All tips welcome,
Kind regards,
Jochen