SpringSource/grails-data-mapping — pull request #145 by noamt (2013-09-03 14:54:42+00:00)
Title: NullPointerException is thrown when cascade deleting a broken -to-many relationship

Given a *-to-many relationship -
There are cases in which a relationship may be broken; that is, a referenced entity is removed, but the reference to it is maintained in the owner.

In such a case, GORM maintains the *-to-many domain instance field as a persistent collection with "null" objects replacing the missing referenced entities.

Some places, such as the cascading collection delete procedure, aren't able to handle a null object.