openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Curtis <curti...@gmail.com>
Subject Re: Null field not persisted for Dates
Date Fri, 04 Feb 2011 18:46:39 GMT
Jerry -

Is the Entity which you are trying to update being serialized/deserialized?

Thanks,
Rick

On Fri, Feb 4, 2011 at 12:25 PM, Jerry Carter <jerry@jerrycarter.org> wrote:

> Using OpenJPA 2.0.1, I have a date field in my entity.  Setting the field
> to a non-null value causes the data to be persisted as one would expect.
>  Setting the value to null, however, does not trigger an UPDATE operation.
>  I'm still digging, but I'm sure that someone else has encountered this.
>
> FWIW, the annotations for the field are simple:
>
> @Temporal(TemporalType.DATE)
> @Column(name="purchase_date" private Date purchaseDate;
>
> I do not specify 'nullable', but it defaults to true and the field supports
> a NULL value in the database.
>
> -=- Jerry
>
>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message