If you only wanted to delete a few then, yes you are correct. However, how many is "a few" before the IN becomes extremely long?. I don't know if there are any performance hits for a large number of IN statements. If there is, I presume this would be different for each database type. Could (should?) NH be coded to deal with this?
btw, you example said: A.myChildren.clear(); Which suggested to me to delete all the children for the current parent, hence my SQL suggestion. Unless someone tells me differently, NH will not do this "delete all children for a foreign key", which I feel it should as it performs significantly better than row by row delete or, I expect, via a list of IN key values. This is something I suspect is quite common. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nhusers?hl=en -~----------~----~----~----~------~----~------~--~---
