You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Marko Lahma <ma...@sysforte.fi> on 2003/07/30 08:05:32 UTC

JDO OJB bridge and object states

Hi again!

I've read earlier postings about JDO and it's state transitions (dirty, 
persistent, transient) and and OJB's shortcomings in this area of 
functionality. Is there any light ahead for this to work some day?

I've found it quite impossible to update an object back to datastore 
because JDO sees these fetched objects as non persistent and therefore 
tries to add them into database which leads to primary key violation.

Any workarounds, anything?

-Marko



---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: JDO OJB bridge and object states

Posted by Marko Lahma <ma...@sysforte.fi>.
Hello Thomas,

This might have been my own fault. I fetched the an object within other 
transaction and tried to set it to another object's field within another 
transaction  and then tried to persist the container object. This caused 
a primary key violation because it was already in the database. All JDO 
flags (pesistent, dirty, transient) seem to be false even after data has 
just been fetched from database, which is weird.

Is this expected behaviour?

-Marko

> 
> I'm not aware of any shortcomings of the JDO stuff.
> please post a code sample to understand your problem.
> 
> If there is a bug we'll have to fix it!




---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: JDO OJB bridge and object states

Posted by Thomas Mahler <th...@web.de>.
Hi Marko,

I'm not aware of any shortcomings of the JDO stuff.
please post a code sample to understand your problem.

If there is a bug we'll have to fix it!

thanks,
Thomas

Marko Lahma wrote:
> Hi again!
> 
> I've read earlier postings about JDO and it's state transitions (dirty, 
> persistent, transient) and and OJB's shortcomings in this area of 
> functionality. Is there any light ahead for this to work some day?
> 
> I've found it quite impossible to update an object back to datastore 
> because JDO sees these fetched objects as non persistent and therefore 
> tries to add them into database which leads to primary key violation.
> 
> Any workarounds, anything?
> 
> -Marko
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org