Ok, Thomas... I�v tried DList in my collections and I�ve noticed two behaviors:
1) Relations 1:n - I�ve need put auto-delete true in order auto-deletes works 2) Relations m:n - auto-delete must be false. Then, ODMG deletes the intermediary table rows associates with the object I�m deleting. Not objects in the other tables. If you put auto-delete true, then ODMG deletes ALL objects in tables, not only the intermediary table rows. For example: 1) Invoice:Invoice_lines auto-delete must be true. So, if I delete an invoice, ODMG deletes all invoice lines. 2) User-Groups: auto-delte must be false. If I delete an user, ODMG deletes all rows associates with that user, but not the groups associated with the user. Vice-versa, if I delete a group, ODMG deletes all intermediary rows, but not the users associates with that group. I thinks that�s the correct behavior, don�t? Greetings. Jose Galiana -----Mensaje original----- De: Thomas Mahler [mailto:[EMAIL PROTECTED]] Enviado el: martes, 08 de octubre de 2002 21:07 Para: OJB Users List Asunto: Re: Collections or DCollections? Hi again, Jose Galiana wrote: > So, if I want ODMG deletes objects and their rows in dabatase I must to use > DList instead List, don�t? > If you want to have it done *automagically*, yes. > > > -----Mensaje original----- > De: Thomas Mahler [mailto:[EMAIL PROTECTED]] > Enviado el: martes, 08 de octubre de 2002 20:35 > Para: OJB Users List > Asunto: Re: Collections or DCollections? > > > Hi Jose, > > Jose Galiana wrote: > >>Works ODMG better if the collection-description elements in classes are >>DCollections (DList, etc.. ) than traditional java.util.collection? Why? >> > > > If you want to have collection that are aware of removing and adding > items you'll have to use DList. > If you don't need such a feature you can use normal collections as well. > The DList collection bring a lot of overhead with them. > If you need ODMG compatibility you should use them. > > >>If I don�t use auto-delte in ODMG collections, how ODMG deletes the rows > > in > >>database? > > > ODMG tracks all objects that can be reached from an object that is > locked to the transaction. Thus the transaction is aware of which object > must be deleted. The PB kernel cannot do this, as it does not track the > state of objects. > > cheers, > Thomas > > >>Thanks in advance >>Jose Galiana >> > > > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > > > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
