Hi Thomas

These are probably going to be "dumb" questions but I cannot find answers
anywhere.  [The mail list archive is so frustrating to use.]

1. How do I lock 'b' elements from a collection using the ODMG API?

2. Can I double check regarding the collection-descriptor
auto-retrieve/update/delete that in the Advanced O/R is states: 

"These default settings are mandatory for proper operation of the ODMG and
JDO implementation."

that this means accept the defaults when using ODMG?  (I get errors when I
set auto-update="true", but when using deletePersistent(obj) I found setting
auto-delete="true" removed the 'b' elements but when not set the 'b'
elements remained persisted.

3. As DList is abstract what would I use in a model object to store 'b'
elements?  I see where the Implementation object can create a new DList
odmg.newDList() ????

Cheers
Shane


-----Original Message-----
From: Thomas Mahler [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, 11 June 2003 5:51 p.m.
To: OJB Users List
Subject: Re: 1:m relation not updating

You have to lock the b elements too if you are using normal collections 
to hold the many-side of the association.

If you were using DList as your collection class this won't be required.

cheers,
thomas

Saman Ghodsian wrote:
> Hi there, 
> 
> Here is the situation...... Say I have class A and class B   1----->m
> 
> I created the repository.xml 
> 
> Everything works fine when storing A to DB with a couple of B's
> 
> Tx.lock(a, Transaction.WRITE);
> Tx.Commit
> 
> 
> Next step is to load a and add more B's and then save it again.....
> 
> I created the query..... And all a and the related B's get loaded ok....
> 
> Now I add a couple more B's 
> And store a 
> 
> 
> Tx.lock(a, Transaction.WRITE);
> Also tried 
> Tx.lock(a, Transaction.UPGRADE);
> 
> But the new B's don't get inserted in DB.....
> Any ideas????
> 
> Thanks
> 
> 
> 
> Sam
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


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

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

Reply via email to