Re: Q: Howto set TIMESTAMP column to null?

2008-07-03 Thread Dirk Brenckmann
Tyvm - this did the trick :-) > Von: Pinaki Poddar <[EMAIL PROTECTED]> > > A viable approach. OpenJPA can 'externalize' a field value. For example, > the TIMESTAMP field can be stringified at database. See details [1]. > > [1] > http://openjpa.apache.org/docs/latest/manual/manual.html#ref_gu

Re: Q: Howto set TIMESTAMP column to null?

2008-07-02 Thread Pinaki Poddar
Hi, > 2) makes me think, there would be a workarround for my problem, if it > was possible to persuade openjpa to convert datetime columns to > java.lang.String instead of java.sql.Timestamp ... e.g.: A viable approach. OpenJPA can 'externalize' a field value. For example, the TIMESTAMP field c

Re: Q: Howto set TIMESTAMP column to null?

2008-07-02 Thread Brenckmann, Dirk
Hello Michael, ty 4 your answer. > After some experimentation found that using TIMESTAMP NULL had the desired > behavior - ie : > @Column(name = "validTo", columnDefinition = "TIMESTAMP NULL", > nullable = true, insertable = true, updatable = true) > @Temporal(TemporalType.TIMESTAMP)

Re: Q: Howto set TIMESTAMP column to null?

2008-07-02 Thread Michael Dick
Hi Dirk, What happens if you insert a row through the mysql console? I created a table with the column definition you provided and I found that the column was always set to the current time. After some experimentation I found that using TIMESTAMP NULL had the desired behavior - ie : @Column(n

Q: Howto set TIMESTAMP column to null?

2008-07-02 Thread Dirk Brenckmann
Database: mysql 4.1 Geronimo 2.0.1 Hi there, I'm using a database with timestamp columns that can be null. Using SQL syntax, null enties can be set by either not setting the field when creating a row, or by explictly setting it to '-00-00 00:00:00'. This lead me to some amazing discoverie

Fwd: Q: Howto set TIMESTAMP column to null?

2008-07-02 Thread Dirk Brenckmann
Original-Nachricht Datum: Wed, 02 Jul 2008 15:42:07 +0200 Von: "Dirk Brenckmann" <[EMAIL PROTECTED]> An: users@openjpa.apache.org Betreff: Q: Howto set TIMESTAMP column to null? Database: mysql 4.1 Geronimo 2.0.1 Hi there, I'm using a database with times