this is the expected behaviour of deleteByQuery ;) the delete is done completely in the dbms, thus related objects can not be delteted before the parent object. deleteByQuery also does not remove deleted objects from the cache because it does not know which objects are affected. so if you want all the nice features of ojb you'll have to delete each object individually.
deleteByQuery is nice to delete large amounts of unrelated objects.
hth jakob
Lars Soltau wrote:
Greetings,
I have two classes with a 1:n relationship between them, mapped to a collection in the parent class. I've set the "auto-delete" attribute to "true" for this collection, but when I delete parent objects by query, I get a database exception "child record found". Is this a bug or a feature?
Lars Soltau
--------------------------------------------------------------------- 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]
