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 <[EMAIL PROTECTED]> wrote:

> From: Pinaki Poddar <[EMAIL PROTECTED]>
> 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.


      

Reply via email to