Hi Armin,

problem is solved. I do a broker.clearCache after an object has been deleted
and changed the auto-update setting to false. But I guess this is not an
expected behaviour that the object remains in cache after it has been
deleted, does it? Or in general, should one always do a clearCache after
update, insert or delete?

Dirk   

-----Urspr�ngliche Nachricht-----
Von: Armin Waibel [mailto:[EMAIL PROTECTED] 
Gesendet: Samstag, 21. Februar 2004 13:36
An: OJB Users List
Betreff: Re: Delete object in a 1:N assoc only with RemovalAwareCollection?

Hi Dirk,

Dirk Manske (Service Respond) wrote:
> Hi,
> 
> I am using PB API with DB2. I experience the phenomen that in a 1:N 
> association a N object is not being deleted. I do not use a 
> RemovalAwareCollection. Here is the scenario:
> 
> Table Activity and table Schedule are 1:N related. A user can delete a 
> specific schedule or all schedules of a particular activity object. If 
> the user selects a schedule to delete, the app retrieves the 
> scheduleId and scheduleObject from the DB. Then it simply deletes the 
> object by broker.delete(scheduleObject). So far it is only theory 
> because the scheduleObject remains in the DB. How to delete?
>

hmm, sounds strange. Are your sure that the schedule object wasn't deleted
from DB, or did OJB find this object in cache after delete?
Do you store the Activity object after the delete too and set auto-update
true in collection-descriptor of Activity and do not remove (the deleted)
schedule object from collection?


regards,
Armin

> I could not find anything in the faqs. However, the testcases always 
> use RemovalAwareCollection. Can someone point out the concept behind this?
> 
> thx,
> Dirk
> 
> 
> ---------------------------------------------------------------------
> 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