Anonymous Human
Anonymous Human

Reputation: 1948

Grails one to many relationship behavior

I know that one of the benefits of the one to many relationships is cascading behavior such as the deletion of a parent(owning) object resulting in the deletion of the children(objects the parent owned) but what if the objects owned by it are also owned by another parent do they still get deleted if only one parent gets deleted?

Upvotes: 0

Views: 38

Answers (1)

Joshua Moore
Joshua Moore

Reputation: 24776

GORM/Grails is smart enough to figure out in this case that the child instances should not be deleted when they are in use by another instance. (As indicated in my comments to the original question)

Upvotes: 1

Related Questions