On 10/3/05, Pedro Emanuel Castro Faria Salgado <[EMAIL PROTECTED]> wrote:
>
> After storing an object with a date property with a null value, I always
> retrieve the object with a non-null value on that property (in fact it comes
> with the time when the object was stored) when it should be null.
>
> I tried using the "nullable" attribute but I am not getting the expected
> behaviour.
>
> Is there a way to have to solve this?
>
> The field looks like this:
>
>     <field-descriptor
>         name="dateApproval"
>         column="date_approval"
>         jdbc-type="TIMESTAMP"
>         nullable="true"
>     >
>
> I am using OJB 1.0.1 and MySQL.

Which MySQL version do you use ? You should be aware that MySQL prior
to 4.1 automatically updates TIMESTAMP columns, and later versions may
do that as well depending on the server setup (see section 11.3.1.1 in
the MySQL Reference Manual).

I think you should rather use DATETIME as the column field, will save
you some headache.

Tom

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to