pramoth / specification-with-projection

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

Support for Spring Boot 3: Javax -> jakarta migration #29

Open barryspearce opened 1 year ago

barryspearce commented 1 year ago

javax.persistence should be changed to jakarta.persistence to support Spring boot 3.

This does involve moving the baseline to Java 17.

eidottermihi commented 1 year ago

afaik Spring Data JPA 3.X supports Specifications with Projections out-of-the-box, so there should be no need for this particular library if you're using Spring Boot 3.

barryspearce commented 1 year ago

afaik Spring Data JPA 3.X supports Specifications with Projections out-of-the-box, so there should be no need for this particular library if you're using Spring Boot 3.

@eidottermihi The JpaSpecificationExecutor seems not to have changed between 2 and 3. No method supporting a specification and a projection class is available as far as I can tell - its not in the docs either. https://docs.spring.io/spring-data/jpa/docs/current/api/org/springframework/data/jpa/repository/JpaSpecificationExecutor.html

Thus I think this library is still required for Spring Boot 3.

eidottermihi commented 1 year ago

@barryspearce my bad, you are right. I was mislead by some issues, but Specifications + Projections are still unsupported in Spring Data JPA 3. Issue requesting such a feature is https://github.com/spring-projects/spring-data-jpa/issues/1524

mdillenk commented 1 year ago

i have created a branch called spring-3.0.4 that seems to be working, but there are failing tests, I tried pushing my branch up but I get a permission denied error. push --progress --porcelain origin refs/heads/spring-3.0.4:refs/heads/spring-3.0.4 --set-upstream remote: Permission to pramoth/specification-with-projection.git denied to mdillenk.

trks1970 commented 1 year ago

@mdillenk you should maybe fork first and create a PR on your fork

slgobinath commented 1 year ago

Thanks @mdillenk for your effort. I've created a new PR based on your changes including the fix to unit test failure. https://github.com/pramoth/specification-with-projection/pull/33