Hi Stein,
It happened at commit time in the database.
The object-fields show correct values at all the debug time.
I use Oracle817.
There is no timestamp type but date in Oracle.
So the type of field TCD_LAST_RUN_TIME is date.
It seems that the problem is the wrong type.
When I change
<sql name="TCD_LAST_RUN_TIME" type ="timestamp" dirty="ignore"/>
to
<sql name="TCD_LAST_RUN_TIME" type ="date" dirty="ignore"/>
everything is ok.
But I want to save time information too.
What java type I should use for timestamp?
Thanks,
Roger
----- Original Message -----
From: "Stein M. Hugubakken" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, February 01, 2004 11:02 PM
Subject: Re: [castor-dev] Bug with updating Date type field
> ?? wrote:
> >
> >
> > After updating, TCD_DESC will change to strange value.
> >
>
> I'm not sure what you're trying to do or where the problem is.
>
> When does TCD_DESC change, after commit?
>
> Is it updated in the database, or just in the object-field?
>
> What is a strange value? What value did it have before?
>
> Why do you have dirty="ignore" for sql, I don't think it is supported yet?
>
> You could try to simplify this:
> <field name="tcdDesc" type="java.lang.String">
> <sql name="TCD_DESC" type ="char" dirty="ignore"/>
> </field>
>
> to:
> <field name="tcdDesc" type="string">
> <sql name="TCD_DESC"/>
> </field>
>
> Here is an inconsistency between java.util.Date and timestamp:
> <field name="tcdLastRunTime" type="java.util.Date">
> <sql name="TCD_LAST_RUN_TIME" type ="timestamp" dirty="ignore"/>
> </field>
>
> Castor can't automaticly convert between these two types I think, but
> I'm not sure.
>
> Is the database-field really timestamp or is it a Date or something else?
>
> What type of database is this?
>
> Stein
>
> -----------------------------------------------------------
> If you wish to unsubscribe from this mailing, send mail to
> [EMAIL PROTECTED] with a subject of:
> unsubscribe castor-dev
>
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev