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

Reply via email to