I'm trying to make a method in CrudRepository that will be able to give me duplicates in my table. I want to find a Person which have the same name and on the same day's birthday. For that I think it is easier, I want to find first all same names and then I want to filter names with the same birthday. Wished Method is a Specification but also queries are possible.
Is there a way in JPA?
Full Table:
ID Name Birthday
1 Jean 11.10.2019
2 Jones 10.10.2019
3 Jean 11.10.2019
4 Jean 12.10.2019
First wished result, filter with same names:
ID Name Birthday
1 Jean 11.10.2019
3 Jean 11.10.2019
4 Jean 12.10.2019
The second wished result is:
ID Name Birthday
1 Jean 11.10.2019
3 Jean 11.10.2019
Because Name "Jean" has on the same day birthday.
Can anybody help?