Now I remember why I'm always hesitant to upgrade OJB - it seems like 
there is some fundamental change to how things work. I hope things are 
getting more stable, 'cause in the in-between times when I don't have to 
rework, it's a great tool.

Here's where I'm stuck now.  I just upgraded from 1.0.0 to 1.0.3; I use 
the ODMG API.  I have the following pseudo-code:

        child = retrieveSomeObjectFromDatabase();
        tx = odmg.newTransaction();
        parent = new Parent();
        database.makePersistent(parent);
        parent.addChild(child);
        tx.commit();

parent.addChild() does what it sounds like: calls children.add(child).
When I commit the transaction, OJB tries to insert a new Child.  Can 
anybody tell me why this might happen?  This is, obviously, a showstopper 
for me.  It happens with default caching (i.e. none) and with the 
two-level cache.

Other random ODMG questions:
At some point, the instructions for adding a new persistent object using 
ODMG changed; I'm not sure when.  It used to say that tx.lock(object, 
tx.WRITE) would add the object to the db if it wasn't already there, and 
this is how I've always done it.  Now I see that the tutorial says to use 
db.makePersistent(object), and the code for the two is different.  Will 
tx.lock() still work, or do I have to rewrite all of my DAOs?
Is it true that the (unofficial) feature which actually did allow ODMG to 
observe auto-delete settings is gone?  I've always (in OJB ODMG) used 
cascading delete bounded by appropriate auto-delete settings; now it looks 
as if I have no choice but to delete each individual object by hand. True? 
 Setting the cascading delete settings by relationship type (1:1, 1:n, 
m:n) seems extremely weird, and certainly won't be very useful, since the 
correct delete semantics are always a function of the particular 
relationship, not of the form of the relationship.

thanks,
-steve

Steve Clark
ECOS Development Group
[EMAIL PROTECTED]
(970)226-9291


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

Reply via email to