I am using Hibernate with annotations.
I have table like this
Code:
CREATE TABLE etel.torderstatussnap
(
orderstatussnapid int4 NOT NULL DEFAULT nextval(('etel."torderstatussnap_id_seq"'::text)::regclass),
orderstatussnap_orderid int4,
orderstatussnap_statusid int4,
orderstatussnapdate timestamptz DEFAULT now(),
id_contact_handler int4
);
If I set the orderstatussnapdate column to insertable = false the default value, now() will be set in the database, but the data isn't read back into the object...
I want to use the databases now() since I am connecting to the database several places and not using hibernate on all those places either.
So, how should I handle this?
Surely somebody must have had the same problem?
Thanks in advance for any help!