How do I write JPA QL statements that hints to the runtime to use the DEFAULT value ?
- by Jacques René Mesrine
I have a table like so:
mysql> show create table foo;
CREATE TABLE foo
(
    network bigint NOT NULL,
    activeDate datetime NULL default '0000-00-00 00:00:00',
    ...
)
In the domain object, FooVO the activeDate member is annotated as Temporal.
If I don't set activeDate to a valid Date instance, a new record is inserted with NULLs.
I want the default value to take effect if I don't set the activeDate member. Thanks.