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

Would it be possible to have a EntityGraphRepository? #6

Closed marceloverdijk closed 7 years ago

marceloverdijk commented 7 years ago

In my project I'm extending the ordinary org.springframework.data.repository.Repository as I don't want to expose all the default crud stuff.

Would that be possible with this library?

reda-alaoui commented 7 years ago

Hello @marceloverdijk ,

I just made the test:

public interface MakerRepository extends Repository<Maker, Long> {

    List<Maker> findByName(String name, EntityGraph entityGraph);

}

So yes, a org.springframework.data.repository.Repository already works :) Therefore, no need to add a new EntityGraphRepository interface.

I will update the documentation about that.

reda-alaoui commented 7 years ago

Documentation and test added. I think I answered your question.

If not, feel free to reopen ;)

marceloverdijk commented 7 years ago

Cool, will try it today!