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

EntityGraphJpaRepositoryFactoryBean and @DataJpaTest #25

Closed tuure closed 5 years ago

tuure commented 5 years ago

I try to test my service with repository that use EntityGraphJpaRepository and always get Failed to create query for method public abstract java.util.List xxx.findByProjectPublicId(java.lang.String,com.cosium.spring.data.jpa.entity.graph.domain.EntityGraph)! At least 2 parameter(s) provided but only 1 parameter(s) present in query. at org.springframework.data.jpa.repository.query.PartTreeJpaQuery.(PartTreeJpaQuery.java:82)

reda-alaoui commented 5 years ago

As stated in https://github.com/Cosium/spring-data-jpa-entity-graph/blob/master/doc/MAIN.md#quick-start, you must set repositoryFactoryBeanClass.