Grails logical delete is a good option to perform soft delete on entities.Let me explain the issue which i am facing
1.I implemented my domain class User with LogicalDelete<User>
2.If i retrieve the user list, its filtering the deleted objects by default and giving the list.
3.Now i have one more class called UserRole which contains user and role.
4.When i am trying to get the users from UserRole objects, the delete filtering is not happening by default
def result = UserRole.findAll {
role == "ROLE_USER"
}.collect { it.user }
result includes deleted objects also.
Now my question is how can i perform deleted objects filtering from other objects which contains User object (by enabling the default delete filtering )
Except mentioning the property (deleted = false)