Java Mailing List Archive

http://www.gg3721.com/

Home » users.openjpa »

How to apply creation timestamp with

Marcel Ruff

2008-08-05

Replies: Find Java Web Hosting

Author LoginPost Reply
Hi,

i need to set for Postgres 8.3.x on new table entry creation a timestamp
and have tried this:

  @Column(name = "creationts", columnDefinition="timestamp not null
default current_timestamp")
  public java.sql.Timestamp getCreationTs() { return creationTs; }

The dll applied to Postgres directly works fine and creates the
timestamp during insert on the fly.

Using openJpa i get:

org.apache.openjpa.persistence.PersistenceException: ERROR: null value
in column "creationts" violates not-null constraint

what can i do?

Thanks
Marcel

--
Marcel Ruff
http://watchee.net


©2008 gg3721.com - Jax Systems, LLC, U.S.A.