Cosium / spring-data-jpa-entity-graph

Spring Data JPA extension allowing full dynamic usage of EntityGraph on repositories
MIT License
469 stars 52 forks source link

Equals and hashCode on AbstractEntityGraph? #21

Closed thyming closed 5 years ago

thyming commented 5 years ago

This is maybe a question and maybe and issue - I ran into a problem where I had introduced this project as a dependency (thanks!) but mock calls were failing to match because I (incorrectly) assumed that EntityGraphs.named("x").equals(EntityGraphs.named("x")) is true. Is there a reason that equals and hashCode are not implemented? Would you accept a PR adding this to AbstractEntityGraph?

reda-alaoui commented 5 years ago

Hi @thyming ,

There are no equals/hashCode on AbstractEntityGraph because I didn't have a use for them. I would gladly accept a PR adding them :+1: