openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcel Ruff>
Subject How to apply creation timestamp with
Date Tue, 05 Aug 2008 09:14:18 GMT

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?


Marcel Ruff

View raw message