openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fay Wang <fyw...@yahoo.com>
Subject Re: How to apply creation timestamp with
Date Tue, 05 Aug 2008 23:44:36 GMT
Hi,
   Omitting the "not null" from column definition will make the test case work. However, the
insert statement as shown below in the jdbc trace will insert null into the creationts column,
and the current timestamp (default by db) will never get inserted into the table. Is this
the expected behavior?

6609  CustomerOrder  TRACE  [main] openjpa.jdbc.SQL - <t 1090273532, conn 907294228>
executing prepstmnt 94897576 INSERT INTO EntityA (id, amt, creationts, name) VALUES (?, ?,
?, ?) [params=(int) 1, (double) 0.0, (null) null, (null) null]
6625  CustomerOrder  TRACE  [main] openjpa.jdbc.SQL - <t 1090273532, conn 907294228>
[16 ms] spent
6641  CustomerOrder  TRACE  [main] openjpa.jdbc.JDBC - <t 1090273532, conn 907294228>
[0 ms] commit



--- On Tue, 8/5/08, Pinaki Poddar <ppoddar@apache.org> wrote:

> From: Pinaki Poddar <ppoddar@apache.org>
> Subject: Re: How to apply creation timestamp with
> To: users@openjpa.apache.org
> Date: Tuesday, August 5, 2008, 4:15 PM
> Hi,
>   Omit  'not null' constraint from the column
> definition.
>  
> @Column(name = "creationts",
> columnDefinition="timestamp current_timestamp")
> 
> -- 
> View this message in context:
> http://n2.nabble.com/How-to-apply-creation-timestamp-with-tp673210p674789.html
> Sent from the OpenJPA Users mailing list archive at
> Nabble.com.


      

Mime
View raw message