pramoth / specification-with-projection

Support projections with JpaSpecificationExecutor.findAll(Specification,Pageable) for Spring Data JPA
MIT License
164 stars 56 forks source link

No property findAll found for type *** #14

Open Frantch opened 5 years ago

Frantch commented 5 years ago

@pramoth

I have a simple Repo in 'com.test.myrepo2':

@Repository
public interface TestRepo extends JpaRepository<DocExample, Integer>, JpaSpecificationExecutorWithProjection<DocExample> {

  public static interface DocumentWithoutParent {
    Long getPid();
    String getName();
  }
}

And others normal @Repository in "com.test.myrepo'

In the my .xml context (I dont use SpringBoot) I have added:

<jpa:repositories base-package="com.nexage.admin.core.repository" />
<jpa:repositories base-package="com.test.myrepo2"  factory-class="th.co.geniustree.springdata.jpa.repository.support.JpaSpecificationExecutorWithProjectionImpl" />

But when the app starts I get this Error:

Caused by: org.springframework.data.mapping.PropertyReferenceException: No property findAll found for type DocExample!

What am I doing wrong?

stephanecot commented 3 years ago

Same here

pavankumardharmavarapu commented 2 years ago

please resolve this issue.

saddit commented 2 years ago

You may use base-repository-class instead of factory-class in your config

kasim-ba commented 2 years ago

I'm currently having the same problem. It doesn't matter what Entity I choose. My repositories are created through annotation configuration. Would be nice to get a hint how to fix this problem. Edit: I missed the following line in description: add annotation @EnableJpaRepositories(repositoryBaseClass = JpaSpecificationExecutorWithProjectionImpl.class) Adding the repositoryBaseClass should do the trick