eneymark wrote:
So I have to get the movies of the soon-to-be-deleted author and one by one reset author ? then delete author ? seems bulky ? im looking for more a of a reference relationship if such exists where movie - points to author or null..
Right but the problem is, you've assigned an author to the movie. If you delete the Author and don't update the Movie, the movie will still point to an Author that doesn't exist.
The reason the movies are getting deleted has to do with your cascade= options on the Movie collection of the Author mapping. I actually didn't think cascade="delete" was valid for a one-to-many. I thought this needed to be cascade="delete-orphan" in which case it would delete movies that no longer had a parent Author. You should probably change this to cascade="none" in the Author mapping.