openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcel Ruff ...@marcelruff.info>
Subject How to apply creation timestamp with
Date Tue, 05 Aug 2008 09:14:18 GMT
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



Mime
View raw message