From 85988a6d834135fe0f5acc8793271d51b2ddd246 Mon Sep 17 00:00:00 2001 From: lassis Date: Mon, 25 Dec 2023 17:13:52 +0100 Subject: [PATCH 1/6] fix type information when using dinamic projection and generic repository --- .../query/EntityGraphAwareJpaParameters.java | 44 +++++++++---------- .../query/EntityGraphAwareJpaQueryMethod.java | 28 ++++++------ .../DynamicProjectionRepositoryTest.java | 40 +++++++++++++++++ pom.xml | 2 +- 4 files changed, 77 insertions(+), 37 deletions(-) create mode 100644 core/src/test/java/com/cosium/spring/data/jpa/entity/graph/repository/DynamicProjectionRepositoryTest.java diff --git a/core/src/main/java/com/cosium/spring/data/jpa/entity/graph/repository/query/EntityGraphAwareJpaParameters.java b/core/src/main/java/com/cosium/spring/data/jpa/entity/graph/repository/query/EntityGraphAwareJpaParameters.java index 597a81a..e9a1810 100644 --- a/core/src/main/java/com/cosium/spring/data/jpa/entity/graph/repository/query/EntityGraphAwareJpaParameters.java +++ b/core/src/main/java/com/cosium/spring/data/jpa/entity/graph/repository/query/EntityGraphAwareJpaParameters.java @@ -1,41 +1,39 @@ package com.cosium.spring.data.jpa.entity.graph.repository.query; import com.cosium.spring.data.jpa.entity.graph.domain2.EntityGraph; -import java.lang.reflect.Method; import org.springframework.core.MethodParameter; import org.springframework.data.jpa.repository.query.JpaParameters; +import org.springframework.data.repository.query.ParametersSource; +import org.springframework.data.util.TypeInformation; /** * @author Réda Housni Alaoui */ class EntityGraphAwareJpaParameters extends JpaParameters { - public EntityGraphAwareJpaParameters(Method method) { - super(method); - } - - @Override - protected JpaParameter createParameter(MethodParameter parameter) { - return new EntityGraphAwareJpaParameter(parameter); - } + public EntityGraphAwareJpaParameters(ParametersSource parametersSource) { + super(parametersSource, methodParameter -> + new EntityGraphAwareJpaParameter(methodParameter, parametersSource.getDomainTypeInformation()) + ); + } - private static class EntityGraphAwareJpaParameter extends JpaParameters.JpaParameter { + private static class EntityGraphAwareJpaParameter extends JpaParameters.JpaParameter { - private final boolean entityGraph; + private final boolean entityGraph; - protected EntityGraphAwareJpaParameter(MethodParameter parameter) { - super(parameter); - this.entityGraph = EntityGraph.class.isAssignableFrom(parameter.getParameterType()); - } + private EntityGraphAwareJpaParameter(MethodParameter parameter, TypeInformation domainType) { + super(parameter, domainType); + this.entityGraph = EntityGraph.class.isAssignableFrom(parameter.getParameterType()); + } - @Override - public boolean isBindable() { - return !entityGraph && super.isBindable(); - } + @Override + public boolean isBindable() { + return !entityGraph && super.isBindable(); + } - @Override - public boolean isSpecialParameter() { - return entityGraph || super.isSpecialParameter(); + @Override + public boolean isSpecialParameter() { + return entityGraph || super.isSpecialParameter(); + } } - } } diff --git a/core/src/main/java/com/cosium/spring/data/jpa/entity/graph/repository/query/EntityGraphAwareJpaQueryMethod.java b/core/src/main/java/com/cosium/spring/data/jpa/entity/graph/repository/query/EntityGraphAwareJpaQueryMethod.java index f76e0c3..60af8a6 100644 --- a/core/src/main/java/com/cosium/spring/data/jpa/entity/graph/repository/query/EntityGraphAwareJpaQueryMethod.java +++ b/core/src/main/java/com/cosium/spring/data/jpa/entity/graph/repository/query/EntityGraphAwareJpaQueryMethod.java @@ -1,27 +1,29 @@ package com.cosium.spring.data.jpa.entity.graph.repository.query; -import java.lang.reflect.Method; import org.springframework.data.jpa.provider.QueryExtractor; -import org.springframework.data.jpa.repository.query.JpaParameters; import org.springframework.data.jpa.repository.query.JpaQueryMethod; import org.springframework.data.projection.ProjectionFactory; import org.springframework.data.repository.core.RepositoryMetadata; +import org.springframework.data.repository.query.Parameters; +import org.springframework.data.repository.query.ParametersSource; + +import java.lang.reflect.Method; /** * @author Réda Housni Alaoui */ class EntityGraphAwareJpaQueryMethod extends JpaQueryMethod { - protected EntityGraphAwareJpaQueryMethod( - Method method, - RepositoryMetadata metadata, - ProjectionFactory factory, - QueryExtractor extractor) { - super(method, metadata, factory, extractor); - } + protected EntityGraphAwareJpaQueryMethod( + Method method, + RepositoryMetadata metadata, + ProjectionFactory factory, + QueryExtractor extractor) { + super(method, metadata, factory, extractor); + } - @Override - protected JpaParameters createParameters(Method method) { - return new EntityGraphAwareJpaParameters(method); - } + @Override + protected Parameters createParameters(ParametersSource parametersSource) { + return new EntityGraphAwareJpaParameters(parametersSource); + } } diff --git a/core/src/test/java/com/cosium/spring/data/jpa/entity/graph/repository/DynamicProjectionRepositoryTest.java b/core/src/test/java/com/cosium/spring/data/jpa/entity/graph/repository/DynamicProjectionRepositoryTest.java new file mode 100644 index 0000000..6160e5f --- /dev/null +++ b/core/src/test/java/com/cosium/spring/data/jpa/entity/graph/repository/DynamicProjectionRepositoryTest.java @@ -0,0 +1,40 @@ +package com.cosium.spring.data.jpa.entity.graph.repository; + +import com.cosium.spring.data.jpa.entity.graph.BaseTest; +import com.cosium.spring.data.jpa.entity.graph.sample.Brand; +import com.github.springtestdbunit.annotation.DatabaseSetup; +import jakarta.inject.Inject; +import jakarta.transaction.Transactional; +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Test; +import org.springframework.data.repository.NoRepositoryBean; +import org.springframework.data.repository.Repository; + +import java.io.Serializable; +import java.util.Optional; + +import static org.assertj.core.api.Assertions.assertThat; + +@DatabaseSetup(BaseTest.DATASET) +class DynamicProjectionRepositoryTest extends BaseTest { + + @Inject + private BrandRepository repository; + + @Test + @Transactional + @DisplayName("dynamic projections should work when you have a super class with generics") + void test1() { + var result = repository.findById(1L, Brand.class); + assertThat(result).map(Brand::getId).isPresent(); + + } + + @NoRepositoryBean + public interface EntityGraphBaseRepository extends Repository { + Optional findById(I id, Class clazz); + } + + @org.springframework.stereotype.Repository + public interface BrandRepository extends EntityGraphBaseRepository {} +} diff --git a/pom.xml b/pom.xml index 17b3d7d..42de996 100644 --- a/pom.xml +++ b/pom.xml @@ -19,7 +19,7 @@ 17 - 3.2.0 + 3.2.1 5.0.0 2.7.3 From 246aade6e4f142ab3cf09d297c8aa21ce87fbe44 Mon Sep 17 00:00:00 2001 From: lassis Date: Tue, 26 Dec 2023 17:21:08 +0100 Subject: [PATCH 2/6] code format --- .../query/EntityGraphAwareJpaParameters.java | 40 ++++++++++--------- .../query/EntityGraphAwareJpaQueryMethod.java | 25 ++++++------ .../DynamicProjectionRepositoryTest.java | 39 +++++++++--------- 3 files changed, 51 insertions(+), 53 deletions(-) diff --git a/core/src/main/java/com/cosium/spring/data/jpa/entity/graph/repository/query/EntityGraphAwareJpaParameters.java b/core/src/main/java/com/cosium/spring/data/jpa/entity/graph/repository/query/EntityGraphAwareJpaParameters.java index e9a1810..6632097 100644 --- a/core/src/main/java/com/cosium/spring/data/jpa/entity/graph/repository/query/EntityGraphAwareJpaParameters.java +++ b/core/src/main/java/com/cosium/spring/data/jpa/entity/graph/repository/query/EntityGraphAwareJpaParameters.java @@ -11,29 +11,31 @@ */ class EntityGraphAwareJpaParameters extends JpaParameters { - public EntityGraphAwareJpaParameters(ParametersSource parametersSource) { - super(parametersSource, methodParameter -> - new EntityGraphAwareJpaParameter(methodParameter, parametersSource.getDomainTypeInformation()) - ); - } + public EntityGraphAwareJpaParameters(ParametersSource parametersSource) { + super( + parametersSource, + methodParameter -> + new EntityGraphAwareJpaParameter( + methodParameter, parametersSource.getDomainTypeInformation())); + } - private static class EntityGraphAwareJpaParameter extends JpaParameters.JpaParameter { + private static class EntityGraphAwareJpaParameter extends JpaParameters.JpaParameter { - private final boolean entityGraph; + private final boolean entityGraph; - private EntityGraphAwareJpaParameter(MethodParameter parameter, TypeInformation domainType) { - super(parameter, domainType); - this.entityGraph = EntityGraph.class.isAssignableFrom(parameter.getParameterType()); - } + private EntityGraphAwareJpaParameter(MethodParameter parameter, TypeInformation domainType) { + super(parameter, domainType); + this.entityGraph = EntityGraph.class.isAssignableFrom(parameter.getParameterType()); + } - @Override - public boolean isBindable() { - return !entityGraph && super.isBindable(); - } + @Override + public boolean isBindable() { + return !entityGraph && super.isBindable(); + } - @Override - public boolean isSpecialParameter() { - return entityGraph || super.isSpecialParameter(); - } + @Override + public boolean isSpecialParameter() { + return entityGraph || super.isSpecialParameter(); } + } } diff --git a/core/src/main/java/com/cosium/spring/data/jpa/entity/graph/repository/query/EntityGraphAwareJpaQueryMethod.java b/core/src/main/java/com/cosium/spring/data/jpa/entity/graph/repository/query/EntityGraphAwareJpaQueryMethod.java index 60af8a6..99eeb8b 100644 --- a/core/src/main/java/com/cosium/spring/data/jpa/entity/graph/repository/query/EntityGraphAwareJpaQueryMethod.java +++ b/core/src/main/java/com/cosium/spring/data/jpa/entity/graph/repository/query/EntityGraphAwareJpaQueryMethod.java @@ -1,5 +1,6 @@ package com.cosium.spring.data.jpa.entity.graph.repository.query; +import java.lang.reflect.Method; import org.springframework.data.jpa.provider.QueryExtractor; import org.springframework.data.jpa.repository.query.JpaQueryMethod; import org.springframework.data.projection.ProjectionFactory; @@ -7,23 +8,21 @@ import org.springframework.data.repository.query.Parameters; import org.springframework.data.repository.query.ParametersSource; -import java.lang.reflect.Method; - /** * @author Réda Housni Alaoui */ class EntityGraphAwareJpaQueryMethod extends JpaQueryMethod { - protected EntityGraphAwareJpaQueryMethod( - Method method, - RepositoryMetadata metadata, - ProjectionFactory factory, - QueryExtractor extractor) { - super(method, metadata, factory, extractor); - } + protected EntityGraphAwareJpaQueryMethod( + Method method, + RepositoryMetadata metadata, + ProjectionFactory factory, + QueryExtractor extractor) { + super(method, metadata, factory, extractor); + } - @Override - protected Parameters createParameters(ParametersSource parametersSource) { - return new EntityGraphAwareJpaParameters(parametersSource); - } + @Override + protected Parameters createParameters(ParametersSource parametersSource) { + return new EntityGraphAwareJpaParameters(parametersSource); + } } diff --git a/core/src/test/java/com/cosium/spring/data/jpa/entity/graph/repository/DynamicProjectionRepositoryTest.java b/core/src/test/java/com/cosium/spring/data/jpa/entity/graph/repository/DynamicProjectionRepositoryTest.java index 6160e5f..212f77f 100644 --- a/core/src/test/java/com/cosium/spring/data/jpa/entity/graph/repository/DynamicProjectionRepositoryTest.java +++ b/core/src/test/java/com/cosium/spring/data/jpa/entity/graph/repository/DynamicProjectionRepositoryTest.java @@ -1,40 +1,37 @@ package com.cosium.spring.data.jpa.entity.graph.repository; +import static org.assertj.core.api.Assertions.assertThat; + import com.cosium.spring.data.jpa.entity.graph.BaseTest; import com.cosium.spring.data.jpa.entity.graph.sample.Brand; import com.github.springtestdbunit.annotation.DatabaseSetup; import jakarta.inject.Inject; import jakarta.transaction.Transactional; +import java.io.Serializable; +import java.util.Optional; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.data.repository.NoRepositoryBean; import org.springframework.data.repository.Repository; -import java.io.Serializable; -import java.util.Optional; - -import static org.assertj.core.api.Assertions.assertThat; - @DatabaseSetup(BaseTest.DATASET) class DynamicProjectionRepositoryTest extends BaseTest { - @Inject - private BrandRepository repository; - - @Test - @Transactional - @DisplayName("dynamic projections should work when you have a super class with generics") - void test1() { - var result = repository.findById(1L, Brand.class); - assertThat(result).map(Brand::getId).isPresent(); + @Inject private BrandRepository repository; - } + @Test + @Transactional + @DisplayName("dynamic projections should work when you have a super class with generics") + void test1() { + var result = repository.findById(1L, Brand.class); + assertThat(result).map(Brand::getId).isPresent(); + } - @NoRepositoryBean - public interface EntityGraphBaseRepository extends Repository { - Optional findById(I id, Class clazz); - } + @NoRepositoryBean + public interface EntityGraphBaseRepository extends Repository { + Optional findById(I id, Class clazz); + } - @org.springframework.stereotype.Repository - public interface BrandRepository extends EntityGraphBaseRepository {} + @org.springframework.stereotype.Repository + public interface BrandRepository extends EntityGraphBaseRepository {} } From 424c7d6bda6e8510bf1b705e8f0d7d9ed94793e1 Mon Sep 17 00:00:00 2001 From: lassis Date: Tue, 26 Dec 2023 20:04:24 +0100 Subject: [PATCH 3/6] fix: compatibility matrix --- README.md | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 0dd03ff..9c262a9 100644 --- a/README.md +++ b/README.md @@ -311,21 +311,22 @@ You can play with https://github.com/Cosium/spring-data-jpa-entity-graph-sample # Compatibility matrix -| [Spring Data JPA](https://github.com/spring-projects/spring-data-jpa) version | [Spring Data JPA EntityGraph](https://github.com/Cosium/spring-data-jpa-entity-graph) version | -|-------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| 3.2.x | [![Maven Central 3.2.x](https://img.shields.io/maven-central/v/com.cosium.spring.data/spring-data-jpa-entity-graph/3.2.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.spring.data%22%20AND%20a%3A%22spring-data-jpa-entity-graph%22) | -| 3.1.x | [![Maven Central 3.1.x](https://img.shields.io/maven-central/v/com.cosium.spring.data/spring-data-jpa-entity-graph/3.1.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.spring.data%22%20AND%20a%3A%22spring-data-jpa-entity-graph%22) | -| 3.0.x | [![Maven Central 3.0.x](https://img.shields.io/maven-central/v/com.cosium.spring.data/spring-data-jpa-entity-graph/3.0.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.spring.data%22%20AND%20a%3A%22spring-data-jpa-entity-graph%22) | -| 2.7.x | [![Maven Central 2.7.x](https://img.shields.io/maven-central/v/com.cosium.spring.data/spring-data-jpa-entity-graph/2.7.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.spring.data%22%20AND%20a%3A%22spring-data-jpa-entity-graph%22) | -| 2.6.x | [![Maven Central 2.6.x](https://img.shields.io/maven-central/v/com.cosium.spring.data/spring-data-jpa-entity-graph/2.6.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.spring.data%22%20AND%20a%3A%22spring-data-jpa-entity-graph%22) | -| 2.5.x | [![Maven Central 2.5.x](https://img.shields.io/maven-central/v/com.cosium.spring.data/spring-data-jpa-entity-graph/2.5.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.spring.data%22%20AND%20a%3A%22spring-data-jpa-entity-graph%22) | -| 2.4.x | [![Maven Central 2.4.x](https://img.shields.io/maven-central/v/com.cosium.spring.data/spring-data-jpa-entity-graph/2.4.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.spring.data%22%20AND%20a%3A%22spring-data-jpa-entity-graph%22) | -| 2.3.x | [![Maven Central 2.3.x](https://img.shields.io/maven-central/v/com.cosium.spring.data/spring-data-jpa-entity-graph/2.3.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.spring.data%22%20AND%20a%3A%22spring-data-jpa-entity-graph%22) | -| 2.2.x | [![Maven Central 2.2.x](https://img.shields.io/maven-central/v/com.cosium.spring.data/spring-data-jpa-entity-graph/2.2.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.spring.data%22%20AND%20a%3A%22spring-data-jpa-entity-graph%22) | -| 2.1.x | [![Maven Central 2.1.x](https://img.shields.io/maven-central/v/com.cosium.spring.data/spring-data-jpa-entity-graph/2.1.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.spring.data%22%20AND%20a%3A%22spring-data-jpa-entity-graph%22) | -| 2.0.x | [![Maven Central 2.0.x](https://img.shields.io/maven-central/v/com.cosium.spring.data/spring-data-jpa-entity-graph/2.0.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.spring.data%22%20AND%20a%3A%22spring-data-jpa-entity-graph%22) | -| 1.11.x | [![Maven Central 1.11.x](https://img.shields.io/maven-central/v/com.cosium.spring.data/spring-data-jpa-entity-graph/1.11.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.spring.data%22%20AND%20a%3A%22spring-data-jpa-entity-graph%22) | -| 1.10.x | [![Maven Central 1.10.x](https://img.shields.io/maven-central/v/com.cosium.spring.data/spring-data-jpa-entity-graph/1.10.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.spring.data%22%20AND%20a%3A%22spring-data-jpa-entity-graph%22) | +| [Spring Data JPA](https://github.com/spring-projects/spring-data-jpa) version | [Spring Data JPA EntityGraph](https://github.com/Cosium/spring-data-jpa-entity-graph) version | +|-------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| 3.2.1+ | [![Maven Central 3.2.2+](https://img.shields.io/maven-central/v/com.cosium.spring.data/spring-data-jpa-entity-graph/3.2.2.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.spring.data%22%20AND%20a%3A%22spring-data-jpa-entity-graph%22) | +| 3.2.0 | [![Maven Central 3.2.0](https://img.shields.io/maven-central/v/com.cosium.spring.data/spring-data-jpa-entity-graph/3.2.0.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.spring.data%22%20AND%20a%3A%22spring-data-jpa-entity-graph%22) [![Maven Central 3.2.0](https://img.shields.io/maven-central/v/com.cosium.spring.data/spring-data-jpa-entity-graph/3.2.1.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.spring.data%22%20AND%20a%3A%22spring-data-jpa-entity-graph%22) | +| 3.1.x | [![Maven Central 3.1.x](https://img.shields.io/maven-central/v/com.cosium.spring.data/spring-data-jpa-entity-graph/3.1.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.spring.data%22%20AND%20a%3A%22spring-data-jpa-entity-graph%22) | +| 3.0.x | [![Maven Central 3.0.x](https://img.shields.io/maven-central/v/com.cosium.spring.data/spring-data-jpa-entity-graph/3.0.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.spring.data%22%20AND%20a%3A%22spring-data-jpa-entity-graph%22) | +| 2.7.x | [![Maven Central 2.7.x](https://img.shields.io/maven-central/v/com.cosium.spring.data/spring-data-jpa-entity-graph/2.7.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.spring.data%22%20AND%20a%3A%22spring-data-jpa-entity-graph%22) | +| 2.6.x | [![Maven Central 2.6.x](https://img.shields.io/maven-central/v/com.cosium.spring.data/spring-data-jpa-entity-graph/2.6.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.spring.data%22%20AND%20a%3A%22spring-data-jpa-entity-graph%22) | +| 2.5.x | [![Maven Central 2.5.x](https://img.shields.io/maven-central/v/com.cosium.spring.data/spring-data-jpa-entity-graph/2.5.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.spring.data%22%20AND%20a%3A%22spring-data-jpa-entity-graph%22) | +| 2.4.x | [![Maven Central 2.4.x](https://img.shields.io/maven-central/v/com.cosium.spring.data/spring-data-jpa-entity-graph/2.4.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.spring.data%22%20AND%20a%3A%22spring-data-jpa-entity-graph%22) | +| 2.3.x | [![Maven Central 2.3.x](https://img.shields.io/maven-central/v/com.cosium.spring.data/spring-data-jpa-entity-graph/2.3.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.spring.data%22%20AND%20a%3A%22spring-data-jpa-entity-graph%22) | +| 2.2.x | [![Maven Central 2.2.x](https://img.shields.io/maven-central/v/com.cosium.spring.data/spring-data-jpa-entity-graph/2.2.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.spring.data%22%20AND%20a%3A%22spring-data-jpa-entity-graph%22) | +| 2.1.x | [![Maven Central 2.1.x](https://img.shields.io/maven-central/v/com.cosium.spring.data/spring-data-jpa-entity-graph/2.1.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.spring.data%22%20AND%20a%3A%22spring-data-jpa-entity-graph%22) | +| 2.0.x | [![Maven Central 2.0.x](https://img.shields.io/maven-central/v/com.cosium.spring.data/spring-data-jpa-entity-graph/2.0.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.spring.data%22%20AND%20a%3A%22spring-data-jpa-entity-graph%22) | +| 1.11.x | [![Maven Central 1.11.x](https://img.shields.io/maven-central/v/com.cosium.spring.data/spring-data-jpa-entity-graph/1.11.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.spring.data%22%20AND%20a%3A%22spring-data-jpa-entity-graph%22) | +| 1.10.x | [![Maven Central 1.10.x](https://img.shields.io/maven-central/v/com.cosium.spring.data/spring-data-jpa-entity-graph/1.10.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.spring.data%22%20AND%20a%3A%22spring-data-jpa-entity-graph%22) | For example, if you were using `spring-data-jpa 2.2.x` in your project, you would need to select any `spring-data-jpa-entity-graph 2.2.x`. Thus `spring-data-jpa-entity-graph 2.2.8` would be eligible. From 87e7eb00a4bab4ac0c9814050f72bd128264baca Mon Sep 17 00:00:00 2001 From: lassis Date: Wed, 27 Dec 2023 13:27:56 +0100 Subject: [PATCH 4/6] fix: compatibility matrix --- README.md | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 9c262a9..64af574 100644 --- a/README.md +++ b/README.md @@ -311,22 +311,23 @@ You can play with https://github.com/Cosium/spring-data-jpa-entity-graph-sample # Compatibility matrix -| [Spring Data JPA](https://github.com/spring-projects/spring-data-jpa) version | [Spring Data JPA EntityGraph](https://github.com/Cosium/spring-data-jpa-entity-graph) version | -|-------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| [Spring Data JPA](https://github.com/spring-projects/spring-data-jpa) version | [Spring Data JPA EntityGraph](https://github.com/Cosium/spring-data-jpa-entity-graph) version | +|-------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 3.2.1+ | [![Maven Central 3.2.2+](https://img.shields.io/maven-central/v/com.cosium.spring.data/spring-data-jpa-entity-graph/3.2.2.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.spring.data%22%20AND%20a%3A%22spring-data-jpa-entity-graph%22) | | 3.2.0 | [![Maven Central 3.2.0](https://img.shields.io/maven-central/v/com.cosium.spring.data/spring-data-jpa-entity-graph/3.2.0.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.spring.data%22%20AND%20a%3A%22spring-data-jpa-entity-graph%22) [![Maven Central 3.2.0](https://img.shields.io/maven-central/v/com.cosium.spring.data/spring-data-jpa-entity-graph/3.2.1.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.spring.data%22%20AND%20a%3A%22spring-data-jpa-entity-graph%22) | -| 3.1.x | [![Maven Central 3.1.x](https://img.shields.io/maven-central/v/com.cosium.spring.data/spring-data-jpa-entity-graph/3.1.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.spring.data%22%20AND%20a%3A%22spring-data-jpa-entity-graph%22) | -| 3.0.x | [![Maven Central 3.0.x](https://img.shields.io/maven-central/v/com.cosium.spring.data/spring-data-jpa-entity-graph/3.0.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.spring.data%22%20AND%20a%3A%22spring-data-jpa-entity-graph%22) | -| 2.7.x | [![Maven Central 2.7.x](https://img.shields.io/maven-central/v/com.cosium.spring.data/spring-data-jpa-entity-graph/2.7.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.spring.data%22%20AND%20a%3A%22spring-data-jpa-entity-graph%22) | -| 2.6.x | [![Maven Central 2.6.x](https://img.shields.io/maven-central/v/com.cosium.spring.data/spring-data-jpa-entity-graph/2.6.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.spring.data%22%20AND%20a%3A%22spring-data-jpa-entity-graph%22) | -| 2.5.x | [![Maven Central 2.5.x](https://img.shields.io/maven-central/v/com.cosium.spring.data/spring-data-jpa-entity-graph/2.5.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.spring.data%22%20AND%20a%3A%22spring-data-jpa-entity-graph%22) | -| 2.4.x | [![Maven Central 2.4.x](https://img.shields.io/maven-central/v/com.cosium.spring.data/spring-data-jpa-entity-graph/2.4.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.spring.data%22%20AND%20a%3A%22spring-data-jpa-entity-graph%22) | -| 2.3.x | [![Maven Central 2.3.x](https://img.shields.io/maven-central/v/com.cosium.spring.data/spring-data-jpa-entity-graph/2.3.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.spring.data%22%20AND%20a%3A%22spring-data-jpa-entity-graph%22) | -| 2.2.x | [![Maven Central 2.2.x](https://img.shields.io/maven-central/v/com.cosium.spring.data/spring-data-jpa-entity-graph/2.2.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.spring.data%22%20AND%20a%3A%22spring-data-jpa-entity-graph%22) | -| 2.1.x | [![Maven Central 2.1.x](https://img.shields.io/maven-central/v/com.cosium.spring.data/spring-data-jpa-entity-graph/2.1.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.spring.data%22%20AND%20a%3A%22spring-data-jpa-entity-graph%22) | -| 2.0.x | [![Maven Central 2.0.x](https://img.shields.io/maven-central/v/com.cosium.spring.data/spring-data-jpa-entity-graph/2.0.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.spring.data%22%20AND%20a%3A%22spring-data-jpa-entity-graph%22) | -| 1.11.x | [![Maven Central 1.11.x](https://img.shields.io/maven-central/v/com.cosium.spring.data/spring-data-jpa-entity-graph/1.11.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.spring.data%22%20AND%20a%3A%22spring-data-jpa-entity-graph%22) | -| 1.10.x | [![Maven Central 1.10.x](https://img.shields.io/maven-central/v/com.cosium.spring.data/spring-data-jpa-entity-graph/1.10.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.spring.data%22%20AND%20a%3A%22spring-data-jpa-entity-graph%22) | +| 3.2.x | [![Maven Central 3.2.x](https://img.shields.io/maven-central/v/com.cosium.spring.data/spring-data-jpa-entity-graph/3.2.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.spring.data%22%20AND%20a%3A%22spring-data-jpa-entity-graph%22) | +| 3.1.x | [![Maven Central 3.1.x](https://img.shields.io/maven-central/v/com.cosium.spring.data/spring-data-jpa-entity-graph/3.1.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.spring.data%22%20AND%20a%3A%22spring-data-jpa-entity-graph%22) | +| 3.0.x | [![Maven Central 3.0.x](https://img.shields.io/maven-central/v/com.cosium.spring.data/spring-data-jpa-entity-graph/3.0.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.spring.data%22%20AND%20a%3A%22spring-data-jpa-entity-graph%22) | +| 2.7.x | [![Maven Central 2.7.x](https://img.shields.io/maven-central/v/com.cosium.spring.data/spring-data-jpa-entity-graph/2.7.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.spring.data%22%20AND%20a%3A%22spring-data-jpa-entity-graph%22) | +| 2.6.x | [![Maven Central 2.6.x](https://img.shields.io/maven-central/v/com.cosium.spring.data/spring-data-jpa-entity-graph/2.6.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.spring.data%22%20AND%20a%3A%22spring-data-jpa-entity-graph%22) | +| 2.5.x | [![Maven Central 2.5.x](https://img.shields.io/maven-central/v/com.cosium.spring.data/spring-data-jpa-entity-graph/2.5.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.spring.data%22%20AND%20a%3A%22spring-data-jpa-entity-graph%22) | +| 2.4.x | [![Maven Central 2.4.x](https://img.shields.io/maven-central/v/com.cosium.spring.data/spring-data-jpa-entity-graph/2.4.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.spring.data%22%20AND%20a%3A%22spring-data-jpa-entity-graph%22) | +| 2.3.x | [![Maven Central 2.3.x](https://img.shields.io/maven-central/v/com.cosium.spring.data/spring-data-jpa-entity-graph/2.3.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.spring.data%22%20AND%20a%3A%22spring-data-jpa-entity-graph%22) | +| 2.2.x | [![Maven Central 2.2.x](https://img.shields.io/maven-central/v/com.cosium.spring.data/spring-data-jpa-entity-graph/2.2.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.spring.data%22%20AND%20a%3A%22spring-data-jpa-entity-graph%22) | +| 2.1.x | [![Maven Central 2.1.x](https://img.shields.io/maven-central/v/com.cosium.spring.data/spring-data-jpa-entity-graph/2.1.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.spring.data%22%20AND%20a%3A%22spring-data-jpa-entity-graph%22) | +| 2.0.x | [![Maven Central 2.0.x](https://img.shields.io/maven-central/v/com.cosium.spring.data/spring-data-jpa-entity-graph/2.0.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.spring.data%22%20AND%20a%3A%22spring-data-jpa-entity-graph%22) | +| 1.11.x | [![Maven Central 1.11.x](https://img.shields.io/maven-central/v/com.cosium.spring.data/spring-data-jpa-entity-graph/1.11.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.spring.data%22%20AND%20a%3A%22spring-data-jpa-entity-graph%22) | +| 1.10.x | [![Maven Central 1.10.x](https://img.shields.io/maven-central/v/com.cosium.spring.data/spring-data-jpa-entity-graph/1.10.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.spring.data%22%20AND%20a%3A%22spring-data-jpa-entity-graph%22) | For example, if you were using `spring-data-jpa 2.2.x` in your project, you would need to select any `spring-data-jpa-entity-graph 2.2.x`. Thus `spring-data-jpa-entity-graph 2.2.8` would be eligible. From 5555f275e1e4989137c6378224a951eb7ac3d36f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9da=20Housni=20Alaoui?= Date: Wed, 27 Dec 2023 18:38:21 +0100 Subject: [PATCH 5/6] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 64af574..c44970a 100644 --- a/README.md +++ b/README.md @@ -314,7 +314,7 @@ You can play with https://github.com/Cosium/spring-data-jpa-entity-graph-sample | [Spring Data JPA](https://github.com/spring-projects/spring-data-jpa) version | [Spring Data JPA EntityGraph](https://github.com/Cosium/spring-data-jpa-entity-graph) version | |-------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 3.2.1+ | [![Maven Central 3.2.2+](https://img.shields.io/maven-central/v/com.cosium.spring.data/spring-data-jpa-entity-graph/3.2.2.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.spring.data%22%20AND%20a%3A%22spring-data-jpa-entity-graph%22) | -| 3.2.0 | [![Maven Central 3.2.0](https://img.shields.io/maven-central/v/com.cosium.spring.data/spring-data-jpa-entity-graph/3.2.0.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.spring.data%22%20AND%20a%3A%22spring-data-jpa-entity-graph%22) [![Maven Central 3.2.0](https://img.shields.io/maven-central/v/com.cosium.spring.data/spring-data-jpa-entity-graph/3.2.1.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.spring.data%22%20AND%20a%3A%22spring-data-jpa-entity-graph%22) | +| 3.2.0 | [![Maven Central 3.2.1](https://img.shields.io/maven-central/v/com.cosium.spring.data/spring-data-jpa-entity-graph/3.2.1.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.spring.data%22%20AND%20a%3A%22spring-data-jpa-entity-graph%22) | | 3.2.x | [![Maven Central 3.2.x](https://img.shields.io/maven-central/v/com.cosium.spring.data/spring-data-jpa-entity-graph/3.2.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.spring.data%22%20AND%20a%3A%22spring-data-jpa-entity-graph%22) | | 3.1.x | [![Maven Central 3.1.x](https://img.shields.io/maven-central/v/com.cosium.spring.data/spring-data-jpa-entity-graph/3.1.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.spring.data%22%20AND%20a%3A%22spring-data-jpa-entity-graph%22) | | 3.0.x | [![Maven Central 3.0.x](https://img.shields.io/maven-central/v/com.cosium.spring.data/spring-data-jpa-entity-graph/3.0.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.spring.data%22%20AND%20a%3A%22spring-data-jpa-entity-graph%22) | From e7577fc3db09cc56caa37cb7a8e2c9a3ed5992a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9da=20Housni=20Alaoui?= Date: Wed, 27 Dec 2023 18:38:28 +0100 Subject: [PATCH 6/6] Update README.md --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index c44970a..15a2b84 100644 --- a/README.md +++ b/README.md @@ -315,7 +315,6 @@ You can play with https://github.com/Cosium/spring-data-jpa-entity-graph-sample |-------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 3.2.1+ | [![Maven Central 3.2.2+](https://img.shields.io/maven-central/v/com.cosium.spring.data/spring-data-jpa-entity-graph/3.2.2.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.spring.data%22%20AND%20a%3A%22spring-data-jpa-entity-graph%22) | | 3.2.0 | [![Maven Central 3.2.1](https://img.shields.io/maven-central/v/com.cosium.spring.data/spring-data-jpa-entity-graph/3.2.1.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.spring.data%22%20AND%20a%3A%22spring-data-jpa-entity-graph%22) | -| 3.2.x | [![Maven Central 3.2.x](https://img.shields.io/maven-central/v/com.cosium.spring.data/spring-data-jpa-entity-graph/3.2.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.spring.data%22%20AND%20a%3A%22spring-data-jpa-entity-graph%22) | | 3.1.x | [![Maven Central 3.1.x](https://img.shields.io/maven-central/v/com.cosium.spring.data/spring-data-jpa-entity-graph/3.1.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.spring.data%22%20AND%20a%3A%22spring-data-jpa-entity-graph%22) | | 3.0.x | [![Maven Central 3.0.x](https://img.shields.io/maven-central/v/com.cosium.spring.data/spring-data-jpa-entity-graph/3.0.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.spring.data%22%20AND%20a%3A%22spring-data-jpa-entity-graph%22) | | 2.7.x | [![Maven Central 2.7.x](https://img.shields.io/maven-central/v/com.cosium.spring.data/spring-data-jpa-entity-graph/2.7.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.spring.data%22%20AND%20a%3A%22spring-data-jpa-entity-graph%22) |