Hi,
   
      A workaround is to do the insert first with automatically generated 
timestamp and then update it with the application-provided timestamp. In order 
to do so, you need to remove updatable=false from the Column annotation.

@Entity
@Table(name = "INVOICE", schema = "SALES")
public class 
Invoice implements Serializable {

  @Id
   private int id;

  private String description;

   
@Column(columnDefinition="Timestamp NOT NULL WITH DEFAULT", insertable= 
false)
    private java.sql.Timestamp ts;






----- Original Message ----
From: Arnav-A <[email protected]>
To: [email protected]
Sent: Wed, June 30, 2010 11:46:17 AM
Subject: Re: Passing Current Timestamp to Entity Object's Timestamp field 
variable


Still Waiting for the answer.

Please reply
-- 
View this message in context: 
http://openjpa.208410.n2.nabble.com/Passing-Current-Timestamp-to-Entity-Object-s-Timestamp-field-variable-tp5232583p5238118.html
Sent from the OpenJPA Developers mailing list archive at Nabble.com.



      

Reply via email to