Reputation: 974
I know that, in MongoRepository, there are autogenerated queries like findByParentId
and findByDeletedIsFalse
. I want to get a result that both ByParentId
and among them only the field deleted = false
ones.
I did my research but not come across with such an example. Is it possible?
Upvotes: 0
Views: 165
Reputation: 228
Yes , it should be work as
Considering example where i want to find user who's having email with case insensitive and deleted property set as false
So only need to combine autogenerated queries with AND operator and pass email as parameter.
Like :
findByEmailIgnoreCaseAndDeletedFalse(String email)
Upvotes: 1