Hi Thorsten,
Seems like it could be related... some differences in my situation are
1) the exception only occurs for certain objects (in fact, one with an
id of 50!) and otherwise never occurs. All employees in the database
aside from id 50 can be updated no problem.
2) I am getting the problem in a normal transaction
3) I am using SQL Server 7.0 and not Oracle.
I might try changing the underlying SQL server type but I concur with
your opinion that it isn't solving the basic problem.
Patrick
Koller, Thorsten wrote:
> Hi, all!
>
> I've posted a similar thread some days ago concerning the
> updating-problem with ModifiedObjectException thrown ("Unable to update
> an object" and "Still problems with update"). There have been some
> useful hints, but at least I had to make it out by myself. However, it
> seems to me the same problem as Patrick's.
>
> A workaround that I practice now is to change the database data-type
> "DATE". I found out that after changing a column from type DATE to
> NUMBER (milliseconds of current date) the named exception won't be
> thrown again.
>
> It doesn't seem to me like solving the basic problem but it works.
>
> Hope I could help.
>
> -Thorsten-
>
> -----Urspr�ngliche Nachricht-----
> Von: Adam Esterline [mailto:[EMAIL PROTECTED]]
> Gesendet: Dienstag, 4. September 2001 17:32
> An: [EMAIL PROTECTED]
> Betreff: Re: [castor-dev] Possible JDO bug ("ObjectModifiedException")
>
>
> Have you tried creating a OQL Query to retrieve the Object?
>
> OQLQuery query = db.getOQLQuery( "SELECT e FROM
> com.fc.fortunecookie.beans.Employee WHERE id = $1" );
>
> query.bind( new Integer( 50 ) );
>
> I don't know if this will help, but just wondering if there is a
> difference
> between db.load and using the query.
>
> Give this a try and let us know.
>
> Adam
>
> -----Original Message-----
> From: Patrick van Kann [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, September 04, 2001 11:20 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [castor-dev] Possible JDO bug ("ObjectModifiedException")
>
>
> Adam Esterline wrote:
>
>
>>Have you tried the lazy load feature on the relationship fields?
>>
>
> Thanks for the suggestion Adam, I have tried this, as well as different
> transaction levels (db.lock() as well as in the mapping). I still get
> the error, and in addition to this I have discovered it is ONLY employee
>
> id of 50 which causes the problem.
>
> In any case, it is clearly a bug in JDO as there are no other
> transactions in progress anywhere, either within the Castor app or via
> JDBC/ODBC/etc elsewhere that could be changing this record in mid
> transaction. Therefore, somehow the transaction is interfering with
> itself in some bizarre way.
>
> I would welcome any other hints as to what the nature of the problem is
> and how it can be avoided. I am tempted to manually delete the offending
>
> record from the database and pray that this never happens again, but
> that wouldn't be a very satisfactory outcome. I would rather help to
> understand what is wrong with JDO!
>
> Patrick
>
> -----------------------------------------------------------
> 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
>
> -----------------------------------------------------------
> 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