So I have a need to add a list of users (sec$Users) to an entity, representing the list of users that can see/access things that are associated to it (which I will deal with via custom constraints in code; see my other epic thread; but not important to this issue).
Easy, yeah? Added the many:many association to the entity, set delete policy to unlink and went to test. Added a user. Then removed the user. THE USER WAS DELETED FROM THE DATABASE.
Obviously, undesirable behavior. I thought that’s what cascade did. Leaving delete policy blank also produces a delete of the user.
ExcludeAction is a list action designed to remove entity instances from a data container in UI. Unlike RemoveAction, ExcludeAction does not remove the selected instance from the database. It is required, for example, when working with a many-to-many collection.