For example i have two entities. "RealEstate" and "Picture". RealEstate holds a collection of Picture. In the mapping file RealEstate has a bag in it for Pictures and cascade is Delete".
If you delete a RealEstate all the related Pictures will be deleted. But is there any way to execute a custom method to delete the pictures from the web server.
I did it by assigning cascade="none" and when i delete a RealEstate i first check is there any Pictures related to it, if there is, i call DeletePicture() method for it.
I am curious about what do you do in these kind of situations ?
Thanks