RE: Re: delete relation in indirection-table

2004-03-05 Thread Larry Streepy
I'll ask a more fundamental question: Why is RemovalAwareCollection the
default collection class for M:N relations?  In my experience, it is
extremely rare that you would want the auto delete behavior with M:N.

It would seem more appropriate to change the default instead of having to
document and educate everyone about the default behavior not being what they
would reasonably expect.

Thanks.
Larry.

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]
 Sent: Thursday, March 04, 2004 9:08 AM
 To: OJB Users List
 Subject: Re: Re: delete relation in indirection-table
 
 As far as I remember, this behaviour was changed since 0.96 or 0.97 - I'm
 not sure.
 Of course, a DTD comment alerting that RemovalAwareCollection is default
 is very welcome.
 
 And changes in DOCs, specially relative to M:N mapping, recommending to
 not use default
 value for collection-class IMHO is mandatory.
 
 
 Edson Richter
 
 
  Hi all,
 
   Nope I didn't found any thing on the subject, I found this behaviour
 while debugging ojb (
  thank to eclipse ). And then reading comment in example bundled with
 ojb.
  Same behaviour with all ( I played with ) layer ( odmg, PB ).
 
   It's should be documented AND specified that default collection class
 is
  RemovalAwareCollection ...
 
  Really happy to give ( this insignifiant ... ) help
  AND many many many thank for ojb, document in general is very well
 done.
 
  Message du 04/03/04 10:24
  De : Armin Waibel [EMAIL PROTECTED]
  A : OJB Users List [EMAIL PROTECTED]
  Copie à :
  Objet : Re: delete relation in indirection-table
 
  Hi all,
 
  is this behaviour documented?
 
  regards,
  Armin
 
  Klaus Ripplinger wrote:
   Hi Olivier, Hi Edson,
  
   using MangeableVector solved the problem!
   thanks a lot!
  
  You're very welcome !
   Klaus
  
  
 
  -
  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]



Re: delete relation in indirection-table

2004-03-04 Thread Klaus Ripplinger

Hi Olivier, Hi Edson,

using MangeableVector solved the problem!
thanks a lot!

Klaus



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



Re: delete relation in indirection-table

2004-03-04 Thread Armin Waibel
Hi all,

is this behaviour documented?

regards,
Armin
Klaus Ripplinger wrote:
Hi Olivier, Hi Edson,

using MangeableVector solved the problem!
thanks a lot!
Klaus



-
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]


Re: Re: delete relation in indirection-table

2004-03-04 Thread Olivier NOUGUIER
Hi all,

 Nope I didn't found any thing on the subject, I found this behaviour while debugging 
ojb ( thank to eclipse ). And then reading comment in example bundled with ojb.
Same behaviour with all ( I played with ) layer ( odmg, PB ).

 It's should be documented AND specified that default collection class is 
RemovalAwareCollection ...

Really happy to give ( this insignifiant ... ) help
AND many many many thank for ojb, document in general is very well done.

 Message du 04/03/04 10:24
 De : Armin Waibel [EMAIL PROTECTED]
 A : OJB Users List [EMAIL PROTECTED]
 Copie à : 
 Objet : Re: delete relation in indirection-table
 
 Hi all,
 
 is this behaviour documented?
 
 regards,
 Armin
 
 Klaus Ripplinger wrote:
  Hi Olivier, Hi Edson,
  
  using MangeableVector solved the problem!
  thanks a lot!
 
You're very welcome ! 
  Klaus
  
 

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



Re: Re: delete relation in indirection-table

2004-03-04 Thread edson . richter
As far as I remember, this behaviour was changed since 0.96 or 0.97 - I'm not sure.
Of course, a DTD comment alerting that RemovalAwareCollection is default is very 
welcome.

And changes in DOCs, specially relative to M:N mapping, recommending to not use default
value for collection-class IMHO is mandatory.


Edson Richter


 Hi all,

  Nope I didn't found any thing on the subject, I found this behaviour while 
 debugging ojb (
 thank to eclipse ). And then reading comment in example bundled with ojb.
 Same behaviour with all ( I played with ) layer ( odmg, PB ).

  It's should be documented AND specified that default collection class is
 RemovalAwareCollection ...

 Really happy to give ( this insignifiant ... ) help
 AND many many many thank for ojb, document in general is very well done.

 Message du 04/03/04 10:24
 De : Armin Waibel [EMAIL PROTECTED]
 A : OJB Users List [EMAIL PROTECTED]
 Copie à :
 Objet : Re: delete relation in indirection-table

 Hi all,

 is this behaviour documented?

 regards,
 Armin

 Klaus Ripplinger wrote:
  Hi Olivier, Hi Edson,
 
  using MangeableVector solved the problem!
  thanks a lot!
 
 You're very welcome !
  Klaus
 
 

 -
 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]



Re: delete relation in indirection-table

2004-03-03 Thread Edson Carlos Ericksson Richter
I use exactly same config and works as expected, except I use proxies.

There is any chance you be issueing a delete(Object o2), that is deleting the n 
related object?

I'm using either rc4 and rc5 (latest from CVS). What version are you using? Are you 
using proxies?

Edson Richter

  - Original Message - 
  From: Klaus Ripplinger 
  To: [EMAIL PROTECTED] 
  Sent: Wednesday, March 03, 2004 2:18 PM
  Subject: delete relation in indirection-table


  Hi,

  my problem: how to delete a relation when using Non-Decomposed m:n Mapping. 
  After removing an object from a collection (RemovalAwareCollection) and 
  saving the object
  (PersistenceBrokerFactory.defaultPersistenceBroker().store(Object o)) not only
  the relation is deleted but also the ralated object, i.e. the one 
  that has been removed from the collection. Can this be avoided? F.e. i don't
  want to delete a 'project' when removing a 'project' from 'user'. Only the entry
  in the 
  indirection-table that mapps projects to users should be deleted. 

  Regards 
  Klaus

  collection xml:
  ...
  collection-descriptor
 name=projects
 collection-class=
org.apache.ojb.broker.util.collections.RemovalAwareCollection
 element-class-ref=com.imd.paris.base.Projects
 indirection-table=user_projects
 auto-delete=false
 auto-update=true
 fk-pointing-to-this-class column=user_id/
 fk-pointing-to-element-class column=project_id/
  /collection-descriptor
  ...
   


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



  ---
  Outgoing mail is certified Virus Free.
  Checked by AVG anti-virus system (http://www.grisoft.com).
  Version: 6.0.605 / Virus Database: 385 - Release Date: 1/3/2004

Re: delete relation in indirection-table

2004-03-03 Thread Edson Carlos Ericksson Richter
Ops, my mistake. I use RemovalAware... in 1:N relations.
As stated by Olivier, you must NOT use RemovalAwareCollection - use 
ManageableCollection.

Best regards,

Edson Richter
  - Original Message - 
  From: Edson Carlos Ericksson Richter 
  To: 'OJB Users List' 
  Sent: Wednesday, March 03, 2004 2:39 PM
  Subject: Re: delete relation in indirection-table


  I use exactly same config and works as expected, except I use proxies.

  There is any chance you be issueing a delete(Object o2), that is deleting the n 
related object?

  I'm using either rc4 and rc5 (latest from CVS). What version are you using? Are you 
using proxies?

  Edson Richter

- Original Message - 
From: Klaus Ripplinger 
To: [EMAIL PROTECTED] 
Sent: Wednesday, March 03, 2004 2:18 PM
Subject: delete relation in indirection-table


Hi,

my problem: how to delete a relation when using Non-Decomposed m:n Mapping. 
After removing an object from a collection (RemovalAwareCollection) and 
saving the object
(PersistenceBrokerFactory.defaultPersistenceBroker().store(Object o)) not only
the relation is deleted but also the ralated object, i.e. the one 
that has been removed from the collection. Can this be avoided? F.e. i don't
want to delete a 'project' when removing a 'project' from 'user'. Only the entry
in the 
indirection-table that mapps projects to users should be deleted. 

Regards 
Klaus

collection xml:
...
collection-descriptor
   name=projects
   collection-class=
  org.apache.ojb.broker.util.collections.RemovalAwareCollection
   element-class-ref=com.imd.paris.base.Projects
   indirection-table=user_projects
   auto-delete=false
   auto-update=true
   fk-pointing-to-this-class column=user_id/
   fk-pointing-to-element-class column=project_id/
/collection-descriptor
...
 


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



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.605 / Virus Database: 385 - Release Date: 1/3/2004


  ---
  Outgoing mail is certified Virus Free.
  Checked by AVG anti-virus system (http://www.grisoft.com).
  Version: 6.0.605 / Virus Database: 385 - Release Date: 1/3/2004