openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arnav-A <>
Subject Re: Passing Current Timestamp to Entity Object's Timestamp field variable
Date Tue, 29 Jun 2010 00:42:19 GMT

Thanks Fay for the response.

I tried it the way you have explained and it is working fine.

Basically, by making it insertable=false, it is not putting the the column
corresponding to ts variable in the insert statement and at the time of
insert query run, it is pulling current timestamp from the database.

My requirement to check first if ts is having some value. If ts is not null
and have valid timestamp, insert that into the table or consider the current
timestamp to insert into the table.

With this approach, it is ignoring any value that I pass to the ts and
inserting only the current timestamp to the table.

Please help me achieving above scenario.  
View this message in context:
Sent from the OpenJPA Developers mailing list archive at

View raw message