diff --git a/.github/quarkus-ecosystem-test b/.github/quarkus-ecosystem-test index d5286ab9f8..877973c04d 100755 --- a/.github/quarkus-ecosystem-test +++ b/.github/quarkus-ecosystem-test @@ -3,7 +3,7 @@ set -e # For annotation processors, the managed dependency version doesn't work, so by default, we use 6.2.13.Final # Override this for snapshot builds and use the latest version instead -HIBERNATE_VERSION=6.4.0.Final +HIBERNATE_VERSION=6.6.1.Final # Since the compile output is used rather than the shaded JAR when running a Quarkus test, we must first install the parser to the local maven repo mvn --settings .github/quarkus-ecosystem-maven-settings.xml clean install -pl core/parser -am -Dversion.quarkus-3=${QUARKUS_VERSION} -Dversion.hibernate-orm=${HIBERNATE_VERSION} -DskipTests @@ -11,4 +11,4 @@ mvn --settings .github/quarkus-ecosystem-maven-settings.xml clean install -pl co rm -Rf core/parser/target # In the second execution we exclude the parser from the project list so that it uses the previously installed one, which shades ANTLR PROJECT_LIST=integration/quarkus-3/deployment,examples/quarkus-3/testsuite/base,examples/quarkus-3/testsuite/native/h2,!core/parser -mvn --settings .github/quarkus-ecosystem-maven-settings.xml clean install -Dversion.quarkus-3=${QUARKUS_VERSION} -Dversion.hibernate-orm=${HIBERNATE_VERSION} -Dquarkus.native.container-build=true -Pnative -Ph2 -P"spring-data-2.7.x" -P"deltaspike-1.9" --projects $PROJECT_LIST -am \ No newline at end of file +mvn --settings .github/quarkus-ecosystem-maven-settings.xml clean install -Dversion.quarkus-3=${QUARKUS_VERSION} -Dversion.hibernate-orm=${HIBERNATE_VERSION} -Dquarkus.native.container-build=true -Pnative -Ph2 -P"spring-data-3.3.x" -P"deltaspike-2.0" --projects $PROJECT_LIST -am \ No newline at end of file diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index fed321712f..ba6752623c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -21,553 +21,59 @@ jobs: matrix: include: ################################################ -# hibernate-5.6 +# hibernate-6.6 ################################################ - rdbms: h2 - provider: hibernate-5.6 - jdk: 8 + provider: hibernate-6.6 + jdk: 17 native: true - rdbms: mysql - provider: hibernate-5.6 - jdk: 8 - native: true - - rdbms: mysql8 - provider: hibernate-5.6 - jdk: 8 + provider: hibernate-6.6 + jdk: 17 native: true - rdbms: postgresql - provider: hibernate-5.6 - jdk: 8 + provider: hibernate-6.6 + jdk: 17 native: true - rdbms: oracle - provider: hibernate-5.6 - jdk: 8 + provider: hibernate-6.6 + jdk: 17 # native: true - rdbms: db2 - provider: hibernate-5.6 - jdk: 8 + provider: hibernate-6.6 + jdk: 17 # native: true - rdbms: mssql - provider: hibernate-5.6 - jdk: 8 + provider: hibernate-6.6 + jdk: 17 native: true ################################################ # Test different spring-data and deltaspike versions ################################################ - rdbms: h2 - provider: hibernate-5.6 - jdk: 8 - spring-data: spring-data-1.11.x - deltaspike: deltaspike-1.7 - - rdbms: h2 - provider: hibernate-5.6 - jdk: 8 - spring-data: spring-data-2.0.x - deltaspike: deltaspike-1.8 - - rdbms: h2 - provider: hibernate-5.6 - jdk: 8 - spring-data: spring-data-2.1.x - - rdbms: h2 - provider: hibernate-5.6 - jdk: 8 - spring-data: spring-data-2.2.x - - rdbms: h2 - provider: hibernate-5.6 - jdk: 8 - spring-data: spring-data-2.3.x - - rdbms: h2 - provider: hibernate-5.6 - jdk: 8 - spring-data: spring-data-2.4.x - - rdbms: h2 - provider: hibernate-5.6 - jdk: 8 - spring-data: spring-data-2.5.x - - rdbms: h2 - provider: hibernate-5.6 - jdk: 8 - spring-data: spring-data-2.6.x + provider: hibernate-6.6 + jdk: 17 + spring-data: spring-data-3.3.x ################################################ -# A Hibernate 5.6 profile that also runs the entity-view-annotation-processor +# A Hibernate 6.6 profile that also runs the entity-view-annotation-processor ################################################ - rdbms: postgresql provider: hibernate-apt - jdk: 8 - -################################################ -# datanucleus-5 -################################################ - - rdbms: h2 - provider: datanucleus-5 - jdk: 8 - spring-data: spring-data-1.11.x - deltaspike: deltaspike-1.7 - - rdbms: mysql - provider: datanucleus-5 - jdk: 8 - spring-data: spring-data-1.11.x - deltaspike: deltaspike-1.7 - - rdbms: postgresql - provider: datanucleus-5 - jdk: 8 - spring-data: spring-data-1.11.x - deltaspike: deltaspike-1.7 -# - rdbms: mssql -# provider: datanucleus-5 -# jdk: 8 -# spring-data: spring-data-1.11.x -# deltaspike: deltaspike-1.7 -# - rdbms: db2 -# provider: datanucleus-5 -# jdk: 8 -# spring-data: spring-data-1.11.x -# deltaspike: deltaspike-1.7 -# - rdbms: oracle -# provider: datanucleus-5 -# jdk: 8 -# spring-data: spring-data-1.11.x -# deltaspike: deltaspike-1.7 + jdk: 17 ################################################ # eclipselink ################################################ - rdbms: h2 provider: eclipselink - jdk: 8 - spring-data: spring-data-1.11.x - deltaspike: deltaspike-1.7 -# - rdbms: mysql -# provider: eclipselink -# jdk: 8 -# spring-data: spring-data-1.11.x -# deltaspike: deltaspike-1.7 -# - rdbms: postgresql -# provider: eclipselink -# jdk: 8 -# spring-data: spring-data-1.11.x -# deltaspike: deltaspike-1.7 -# - rdbms: mssql -# provider: eclipselink -# jdk: 8 -# spring-data: spring-data-1.11.x -# deltaspike: deltaspike-1.7 -# - rdbms: db2 -# provider: eclipselink -# jdk: 8 -# spring-data: spring-data-1.11.x -# deltaspike: deltaspike-1.7 -# - rdbms: oracle -# provider: eclipselink -# jdk: 8 -# spring-data: spring-data-1.11.x -# deltaspike: deltaspike-1.7 - -################################################ -# openjpa -################################################ -# - rdbms: h2 -# provider: openjpa -# jdk: 8 -# spring-data: spring-data-1.11.x -# deltaspike: deltaspike-1.7 -# - rdbms: mysql -# provider: openjpa -# jdk: 8 -# spring-data: spring-data-1.11.x -# deltaspike: deltaspike-1.7 -# - rdbms: postgresql -# provider: openjpa -# jdk: 8 -# spring-data: spring-data-1.11.x -# deltaspike: deltaspike-1.7 -# - rdbms: mssql -# provider: openjpa -# jdk: 8 -# spring-data: spring-data-1.11.x -# deltaspike: deltaspike-1.7 -# - rdbms: db2 -# provider: openjpa -# jdk: 8 -# spring-data: spring-data-1.11.x -# deltaspike: deltaspike-1.7 -# - rdbms: oracle -# provider: openjpa -# jdk: 8 -# spring-data: spring-data-1.11.x -# deltaspike: deltaspike-1.7 - -################################################ -# hibernate-5.3 -################################################ - - rdbms: h2 - provider: hibernate-5.3 - jdk: 8 - spring-data: spring-data-1.11.x - deltaspike: deltaspike-1.7 - - rdbms: mysql - provider: hibernate-5.3 - jdk: 8 - spring-data: spring-data-1.11.x - deltaspike: deltaspike-1.7 - - rdbms: postgresql - provider: hibernate-5.3 - jdk: 8 - spring-data: spring-data-1.11.x - deltaspike: deltaspike-1.7 - - rdbms: oracle - provider: hibernate-5.3 - jdk: 8 - spring-data: spring-data-1.11.x - deltaspike: deltaspike-1.7 - - rdbms: db2 - provider: hibernate-5.3 - jdk: 8 - spring-data: spring-data-1.11.x - deltaspike: deltaspike-1.7 - - rdbms: mssql - provider: hibernate-5.3 - jdk: 8 - spring-data: spring-data-1.11.x - deltaspike: deltaspike-1.7 - -################################################ -# datanucleus-5.1 -################################################ -# - rdbms: h2 -# provider: datanucleus-5.1 -# jdk: 8 -# spring-data: spring-data-1.11.x -# deltaspike: deltaspike-1.7 -# - rdbms: mysql -# provider: datanucleus-5.1 -# jdk: 8 -# spring-data: spring-data-1.11.x -# deltaspike: deltaspike-1.7 -# - rdbms: postgresql -# provider: datanucleus-5.1 -# jdk: 8 -# spring-data: spring-data-1.11.x -# deltaspike: deltaspike-1.7 -# - rdbms: mssql -# provider: datanucleus-5.1 -# jdk: 8 -# spring-data: spring-data-1.11.x -# deltaspike: deltaspike-1.7 -# - rdbms: db2 -# provider: datanucleus-5.1 -# jdk: 8 -# spring-data: spring-data-1.11.x -# deltaspike: deltaspike-1.7 -# - rdbms: oracle -# provider: datanucleus-5.1 -# jdk: 8 -# spring-data: spring-data-1.11.x -# deltaspike: deltaspike-1.7 - -################################################ -# hibernate-5.5 -################################################ - - rdbms: h2 - provider: hibernate-5.5 - jdk: 8 - spring-data: spring-data-1.11.x - deltaspike: deltaspike-1.7 -# - rdbms: mysql8 -# provider: hibernate-5.5 -# jdk: 8 -# spring-data: spring-data-1.11.x -# deltaspike: deltaspike-1.7 -# - rdbms: postgresql -# provider: hibernate-5.5 -# jdk: 8 -# spring-data: spring-data-1.11.x -# deltaspike: deltaspike-1.7 -# - rdbms: oracle -# provider: hibernate-5.5 -# jdk: 8 -# spring-data: spring-data-1.11.x -# deltaspike: deltaspike-1.7 -# - rdbms: db2 -# provider: hibernate-5.5 -# jdk: 8 -# spring-data: spring-data-1.11.x -# deltaspike: deltaspike-1.7 -# - rdbms: mssql -# provider: hibernate-5.5 -# jdk: 8 -# spring-data: spring-data-1.11.x -# deltaspike: deltaspike-1.7 - -################################################ -# hibernate-5.4 -################################################ - - rdbms: h2 - provider: hibernate-5.4 - jdk: 8 - spring-data: spring-data-1.11.x - deltaspike: deltaspike-1.7 -# - rdbms: mysql8 -# provider: hibernate-5.4 -# jdk: 8 -# spring-data: spring-data-1.11.x -# deltaspike: deltaspike-1.7 -# - rdbms: postgresql -# provider: hibernate-5.4 -# jdk: 8 -# spring-data: spring-data-1.11.x -# deltaspike: deltaspike-1.7 -# - rdbms: oracle -# provider: hibernate-5.4 -# jdk: 8 -# spring-data: spring-data-1.11.x -# deltaspike: deltaspike-1.7 -# - rdbms: db2 -# provider: hibernate-5.4 -# jdk: 8 -# spring-data: spring-data-1.11.x -# deltaspike: deltaspike-1.7 -# - rdbms: mssql -# provider: hibernate-5.4 -# jdk: 8 -# spring-data: spring-data-1.11.x -# deltaspike: deltaspike-1.7 - -################################################ -# hibernate-5.2 -################################################ - - rdbms: h2 - provider: hibernate-5.2 - jdk: 8 - spring-data: spring-data-1.11.x - deltaspike: deltaspike-1.7 -# - rdbms: mysql -# provider: hibernate-5.2 -# jdk: 8 -# spring-data: spring-data-1.11.x -# deltaspike: deltaspike-1.7 -# - rdbms: postgresql -# provider: hibernate-5.2 -# jdk: 8 -# spring-data: spring-data-1.11.x -# deltaspike: deltaspike-1.7 -# - rdbms: mysql8 -# provider: hibernate-5.2 -# jdk: 8 -# spring-data: spring-data-1.11.x -# deltaspike: deltaspike-1.7 -# - rdbms: oracle -# provider: hibernate-5.2 -# jdk: 8 -# spring-data: spring-data-1.11.x -# deltaspike: deltaspike-1.7 -# - rdbms: db2 -# provider: hibernate-5.2 -# jdk: 8 -# spring-data: spring-data-1.11.x -# deltaspike: deltaspike-1.7 -# - rdbms: mssql -# provider: hibernate-5.2 -# jdk: 8 -# spring-data: spring-data-1.11.x -# deltaspike: deltaspike-1.7 - -################################################ -# hibernate-5.1 -################################################ - - rdbms: h2 - provider: hibernate-5.1 - jdk: 8 - spring-data: spring-data-1.11.x - deltaspike: deltaspike-1.7 -# - rdbms: mysql -# provider: hibernate-5.1 -# jdk: 8 -# spring-data: spring-data-1.11.x -# deltaspike: deltaspike-1.7 -# - rdbms: postgresql -# provider: hibernate-5.1 -# jdk: 8 -# spring-data: spring-data-1.11.x -# deltaspike: deltaspike-1.7 -# - rdbms: mysql8 -# provider: hibernate-5.1 -# jdk: 8 -# spring-data: spring-data-1.11.x -# deltaspike: deltaspike-1.7 -# - rdbms: oracle -# provider: hibernate-5.1 -# jdk: 8 -# spring-data: spring-data-1.11.x -# deltaspike: deltaspike-1.7 -# - rdbms: db2 -# provider: hibernate-5.1 -# jdk: 8 -# spring-data: spring-data-1.11.x -# deltaspike: deltaspike-1.7 -# - rdbms: mssql -# provider: hibernate-5.1 -# jdk: 8 -# spring-data: spring-data-1.11.x -# deltaspike: deltaspike-1.7 - -################################################ -# hibernate-5.0 -################################################ - - rdbms: h2 - provider: hibernate-5.0 - jdk: 8 - spring-data: spring-data-1.11.x - deltaspike: deltaspike-1.7 -# - rdbms: mysql -# provider: hibernate-5.0 -# jdk: 8 -# spring-data: spring-data-1.11.x -# deltaspike: deltaspike-1.7 -# - rdbms: postgresql -# provider: hibernate-5.0 -# jdk: 8 -# spring-data: spring-data-1.11.x -# deltaspike: deltaspike-1.7 -# - rdbms: mysql8 -# provider: hibernate-5.0 -# jdk: 8 -# spring-data: spring-data-1.11.x -# deltaspike: deltaspike-1.7 -# - rdbms: oracle -# provider: hibernate-5.0 -# jdk: 8 -# spring-data: spring-data-1.11.x -# deltaspike: deltaspike-1.7 -# - rdbms: db2 -# provider: hibernate-5.0 -# jdk: 8 -# spring-data: spring-data-1.11.x -# deltaspike: deltaspike-1.7 -# - rdbms: mssql -# provider: hibernate-5.0 -# jdk: 8 -# spring-data: spring-data-1.11.x -# deltaspike: deltaspike-1.7 - -################################################ -# hibernate-4.3 -################################################ - - rdbms: h2 - provider: hibernate-4.3 - jdk: 8 - spring-data: spring-data-1.11.x - deltaspike: deltaspike-1.7 -# - rdbms: mysql -# provider: hibernate-4.3 -# jdk: 8 -# spring-data: spring-data-1.11.x -# deltaspike: deltaspike-1.7 -# - rdbms: postgresql -# provider: hibernate-4.3 -# jdk: 8 -# spring-data: spring-data-1.11.x -# deltaspike: deltaspike-1.7 -# - rdbms: mysql8 -# provider: hibernate-4.3 -# jdk: 8 -# spring-data: spring-data-1.11.x -# deltaspike: deltaspike-1.7 -# - rdbms: oracle -# provider: hibernate-4.3 -# jdk: 8 -# spring-data: spring-data-1.11.x -# deltaspike: deltaspike-1.7 -# - rdbms: db2 -# provider: hibernate-4.3 -# jdk: 8 -# spring-data: spring-data-1.11.x -# deltaspike: deltaspike-1.7 -# - rdbms: mssql -# provider: hibernate-4.3 -# jdk: 8 -# spring-data: spring-data-1.11.x -# deltaspike: deltaspike-1.7 - -################################################ -# hibernate-4.2 -################################################ - - rdbms: h2 - provider: hibernate - jdk: 8 - spring-data: spring-data-1.11.x - deltaspike: deltaspike-1.7 -# - rdbms: mysql -# provider: hibernate -# jdk: 8 -# spring-data: spring-data-1.11.x -# deltaspike: deltaspike-1.7 -# - rdbms: postgresql -# provider: hibernate -# jdk: 8 -# spring-data: spring-data-1.11.x -# deltaspike: deltaspike-1.7 -# - rdbms: mysql8 -# provider: hibernate -# jdk: 8 -# spring-data: spring-data-1.11.x -# deltaspike: deltaspike-1.7 -# - rdbms: oracle -# provider: hibernate -# jdk: 8 -# spring-data: spring-data-1.11.x -# deltaspike: deltaspike-1.7 -# - rdbms: db2 -# provider: hibernate -# jdk: 8 -# spring-data: spring-data-1.11.x -# deltaspike: deltaspike-1.7 -# - rdbms: mssql -# provider: hibernate -# jdk: 8 -# spring-data: spring-data-1.11.x -# deltaspike: deltaspike-1.7 - -################################################ -# datanucleus-4 -################################################ - - rdbms: h2 - provider: datanucleus-4 - jdk: 8 - spring-data: spring-data-1.11.x - deltaspike: deltaspike-1.7 -# - rdbms: mysql -# provider: datanucleus-4 -# jdk: 8 -# spring-data: spring-data-1.11.x -# deltaspike: deltaspike-1.7 -# - rdbms: postgresql -# provider: datanucleus-4 -# jdk: 8 -# spring-data: spring-data-1.11.x -# deltaspike: deltaspike-1.7 -# - rdbms: mssql -# provider: datanucleus-4 -# jdk: 8 -# spring-data: spring-data-1.11.x -# deltaspike: deltaspike-1.7 -# - rdbms: db2 -# provider: datanucleus-4 -# jdk: 8 -# spring-data: spring-data-1.11.x -# deltaspike: deltaspike-1.7 -# - rdbms: oracle -# provider: datanucleus-4 -# jdk: 8 -# spring-data: spring-data-1.11.x -# deltaspike: deltaspike-1.7 + jdk: 17 ################################################ # hibernate-6.2 ################################################ - rdbms: h2 provider: hibernate-6.2 - jdk: 11 + jdk: 17 spring-data: spring-data-3.1.x ################################################ @@ -578,54 +84,30 @@ jobs: jdk: 17 spring-data: spring-data-3.2.x ################################################ -# hibernate-6.5 -################################################ - - rdbms: h2 - provider: hibernate-6.5 - jdk: 17 - spring-data: spring-data-3.3.x -################################################ -# hibernate-6.6 -################################################ - - rdbms: h2 - provider: hibernate-6.6 - jdk: 17 - spring-data: spring-data-3.3.x -################################################ # LTS JDKs ################################################ - rdbms: h2 - provider: hibernate-5.6 - jdk: 11 - - rdbms: h2 - provider: hibernate-5.6 - jdk: 11 - build-jdk: 11 - - rdbms: h2 - provider: hibernate-5.6 - jdk: 17 - - rdbms: h2 - provider: hibernate-5.6 + provider: hibernate-6.6 jdk: 17 build-jdk: 17 ################################################ # Latest GA JDK ################################################ - rdbms: h2 - provider: hibernate-5.6 + provider: hibernate-6.6 jdk: 21 - rdbms: h2 - provider: hibernate-5.6 + provider: hibernate-6.6 jdk: 21 build-jdk: 21 ################################################ # Early access JDKs ################################################ # - rdbms: h2 -# provider: hibernate-5.6 +# provider: hibernate-6.6 # jdk: 22-ea # - rdbms: h2 -# provider: hibernate-5.6 +# provider: hibernate-6.6 # jdk: 22-ea # build-jdk: 22-ea steps: @@ -636,24 +118,20 @@ jobs: run: echo -e "$(ip addr show eth0 | grep "inet\b" | awk '{print $2}' | cut -d/ -f1)\t$(hostname -f) $(hostname -s)" | sudo tee -a /etc/hosts - name: Reclaim Disk Space run: .github/ci-prerequisites.sh - - uses: DeLaGuardo/setup-graalvm@master + - uses: graalvm/setup-graalvm@v1 if: ${{ matrix.native }} with: - graalvm-version: '20.1.0.java11' - - name: Set up Java 8 - uses: AdoptOpenJDK/install-jdk@v1 - with: - version: 8 - targets: JDK8_HOME;JAVA_HOME + java-version: '17' + distribution: 'mandrel' - name: Set up Requested JDK uses: actions/setup-java@v3 - if: ${{ matrix.jdk != 8 && !endsWith(matrix.jdk, '-ea') && matrix.jdk != '21' }} + if: ${{ !endsWith(matrix.jdk, '-ea') && matrix.jdk != '21' }} with: java-version: ${{ matrix.jdk }} distribution: 'temurin' - name: Set up EA JDK uses: actions/setup-java@v3 - if: ${{ matrix.jdk != 8 && (endsWith(matrix.jdk, '-ea') || matrix.jdk == '21') }} + if: ${{ endsWith(matrix.jdk, '-ea') || matrix.jdk == '21' }} with: java-version: ${{ matrix.jdk }} distribution: 'zulu' @@ -676,7 +154,6 @@ jobs: - name: Run build script env: - JDK8_HOME: ${{ env.JDK8_HOME }} RDBMS: ${{ matrix.rdbms }} JPAPROVIDER: ${{ matrix.provider }} JDK: ${{ matrix.jdk }} @@ -691,7 +168,7 @@ jobs: uses: actions/upload-artifact@v4 if: failure() with: - name: test-reports-${{ matrix.provider }}-${{ matrix.rdbms }}-jdk${{ matrix.jdk }}-build-jdk${{ matrix.build-jdk }}-${{ matrix.deltaspike }}-${{ matrix.spring-data }} + name: test-reports-${{ matrix.provider }}-${{ matrix.rdbms }}-jdk${{ matrix.jdk }}-build-jdk${{ matrix.build-jdk }}-${{ matrix.spring-data }} path: './**/*-reports/' - name: Omit produced artifacts from build cache diff --git a/.github/workflows/latest.yaml b/.github/workflows/latest.yaml index 87c5594048..b38cd04df8 100644 --- a/.github/workflows/latest.yaml +++ b/.github/workflows/latest.yaml @@ -34,13 +34,6 @@ jobs: component: hibernate-6.4 jdk: 17 -################################################ -# hibernate-6.5 -################################################ - - rdbms: h2 - component: hibernate-6.5 - jdk: 17 - ################################################ # hibernate-6.6 ################################################ @@ -55,20 +48,15 @@ jobs: run: echo -e "$(ip addr show eth0 | grep "inet\b" | awk '{print $2}' | cut -d/ -f1)\t$(hostname -f) $(hostname -s)" | sudo tee -a /etc/hosts - name: Reclaim Disk Space run: .github/ci-prerequisites.sh - - name: Set up Java 8 - uses: AdoptOpenJDK/install-jdk@v1 - with: - version: 8 - targets: JDK8_HOME;JAVA_HOME - name: Set up Requested JDK uses: actions/setup-java@v3 - if: ${{ matrix.jdk != 8 && !endsWith(matrix.jdk, '-ea') }} + if: ${{ !endsWith(matrix.jdk, '-ea') }} with: java-version: ${{ matrix.jdk }} distribution: 'temurin' - name: Set up EA JDK uses: actions/setup-java@v3 - if: ${{ matrix.jdk != 8 && endsWith(matrix.jdk, '-ea') }} + if: ${{ endsWith(matrix.jdk, '-ea') }} with: java-version: ${{ matrix.jdk }} distribution: 'zulu' @@ -91,7 +79,6 @@ jobs: - name: Run build script env: - JDK8_HOME: ${{ env.JDK8_HOME }} RDBMS: ${{ matrix.rdbms }} COMPONENT: ${{ matrix.component }} JDK: ${{ matrix.jdk }} diff --git a/.github/workflows/publish-snapshot.yaml b/.github/workflows/publish-snapshot.yaml index 5281cd8741..8cdf594823 100644 --- a/.github/workflows/publish-snapshot.yaml +++ b/.github/workflows/publish-snapshot.yaml @@ -15,11 +15,6 @@ jobs: # /etc/hosts file needs to be updated as a workaround for # https://github.com/actions/virtual-environments/issues/3185 run: echo -e "$(ip addr show eth0 | grep "inet\b" | awk '{print $2}' | cut -d/ -f1)\t$(hostname -f) $(hostname -s)" | sudo tee -a /etc/hosts - - name: Set up Java 8 - uses: AdoptOpenJDK/install-jdk@v1 - with: - version: 8 - targets: JDK8_HOME;JAVA_HOME - name: Set up JDK 17 uses: actions/setup-java@v3 with: diff --git a/.github/workflows/quarkus-snapshot.yaml b/.github/workflows/quarkus-snapshot.yaml index 8ae2608654..7defe1517b 100644 --- a/.github/workflows/quarkus-snapshot.yaml +++ b/.github/workflows/quarkus-snapshot.yaml @@ -32,9 +32,10 @@ jobs: run: sudo add-apt-repository ppa:rmescandon/yq && sudo apt update && sudo apt install yq -y - name: Set up Java - uses: actions/setup-java@v1 + uses: actions/setup-java@v3 with: java-version: ${{ env.JAVA_VERSION }} + distribution: 'temurin' - name: Checkout repo uses: actions/checkout@v2 diff --git a/CHANGELOG.md b/CHANGELOG.md index 49620c73f9..468fc53ff2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ Changes that happened in releases -## 1.6.15-SNAPSHOT +## 2.0.0-SNAPSHOT ### New features @@ -10,7 +10,9 @@ None yet ### Bug fixes -None yet +* Fix missing cascading deletes for deletes that contain joins or CTEs +* Fix some issues with PostgreSQL and Oracle multiset SQL rendering with Hibernate ORM 6+ +* Fix returning clause rendering for PostgreSQL with Hibernate ORM 6+ ### Backwards-incompatible changes diff --git a/README.md b/README.md index 9fdd1c55dd..2d97f118d6 100644 --- a/README.md +++ b/README.md @@ -40,12 +40,12 @@ Here is a rough overview of new features that are introduced by Blaze-Persistenc * Use CTEs and recursive CTEs * Use modification CTEs aka DML in CTEs -* Make use of the RETURNING clause from DML statements -* Use the VALUES clause for reporting queries and soon make use of table generating functions -* Create queries that use SET operations like UNION, EXCEPT and INTERSECT +* Make use of the `RETURNING` clause from DML statements +* Use the `VALUES` clause for reporting queries and soon make use of table generating functions +* Create queries that use SET operations like `UNION`, `EXCEPT` and `INTERSECT` * Manage entity collections via DML statements to avoid reading them in memory -* Define functions similar to Hibernates SQLFunction in a JPA provider agnostic way -* Use many built-in functions like GROUP_CONCAT, date extraction, date arithmetic and many more +* Define functions similar to Hibernates `SQLFunction` in a JPA provider agnostic way +* Use many built-in functions like `GROUP_CONCAT`, date extraction, date arithmetic and many more * Easy pagination and simple API to make use of keyset pagination In addition to that, Blaze-Persistence also works around some JPA provider issues in a transparent way. @@ -114,71 +114,47 @@ mvn archetype:generate "-DarchetypeGroupId=com.blazebit" "-DarchetypeArtifactId= Java EE archetype: ```bash -mvn archetype:generate "-DarchetypeGroupId=com.blazebit" "-DarchetypeArtifactId=blaze-persistence-archetype-java-ee-sample" "-DarchetypeVersion=1.6.14" -``` - -Core-only Jakarta archetype: - -```bash -mvn archetype:generate "-DarchetypeGroupId=com.blazebit" "-DarchetypeArtifactId=blaze-persistence-archetype-core-sample-jakarta" "-DarchetypeVersion=1.6.14" -``` - -Entity view Jakarta archetype: - -```bash -mvn archetype:generate "-DarchetypeGroupId=com.blazebit" "-DarchetypeArtifactId=blaze-persistence-archetype-entity-view-sample-jakarta" "-DarchetypeVersion=1.6.14" +mvn archetype:generate "-DarchetypeGroupId=com.blazebit" "-DarchetypeArtifactId=blaze-persistence-archetype-jakarta-ee-sample" "-DarchetypeVersion=1.6.14" ``` ## Supported Java runtimes -All projects are built for Java 7 except for the ones where dependencies already use Java 8 like e.g. Hibernate 5.2, Spring Data 2.0 etc. -So you are going to need a JDK 8 for building the project. The latest Java version we test and support is Java 21. - -We also support building the project with JDK 9 and try to keep up with newer versions. -If you want to run your application on a Java 9 JVM you need to handle the fact that JDK 9+ doesn't export the JAXB and JTA APIs anymore. -In fact, JDK 11 removed the modules, so the command line flags to add modules to the classpath won't work. - -Since libraries like Hibernate and others require these APIs you need to make them available. The easiest way to get these APIs back on the classpath is to package them along with your application. -This will also work when running on Java 8. We suggest you add the following dependencies. +All projects are built for Java 11 except for the ones where dependencies already use Java 17 like e.g. Spring Data integration etc. +So you are going to need a JDK 17 for building the project. The latest Java version we test and support is Java 21. ```xml jakarta.xml.bind jakarta.xml.bind-api - - 2.3.3 + 3.0.1 provided com.sun.xml.bind jaxb-impl - - 2.3.3 + 3.0.2 provided jakarta.transaction jakarta.transaction-api - - 1.3.3 + 2.0.1 provided jakarta.activation jakarta.activation-api - - 1.2.2 + 2.0.1 provided jakarta.annotation jakarta.annotation-api - - 1.3.5 + 2.1.1 provided @@ -188,28 +164,25 @@ The `jakarta.transaction` and `jakarta.activation` dependencies are especially r ## Supported environments/libraries -The bare minimum is JPA 2.0. If you want to use the JPA Criteria API module, you will also have to add the JPA 2 compatibility module. -Generally, we support the usage in Java EE 6+ or Spring 4+ applications. +The bare minimum is JPA 3.1. Generally, we support the usage in Java EE 10+, Quarkus 3+ or Spring 6+ applications. See the following table for an overview of supported versions. -Module | Minimum version | Supported versions ----------------------------------|-------------------------------------|-------------------- -Hibernate integration | Hibernate 4.2 | 4.2, 4.3, 5.0+, 6.2+ (not all features are available in older versions) -EclipseLink integration | EclipseLink 2.6 | 2.6 (Probably 2.4 and 2.5 work as well, but only tested against 2.6) -DataNucleus integration | DataNucleus 4.1 | 4.1, 5.0 -OpenJPA integration | N/A | (Currently not usable. OpenJPA doesn't seem to be actively developed anymore and no users asked for support yet) -Entity View CDI integration | CDI 1.0 | 1.0, 1.1, 1.2, 2.0, 3.0 -Entity View Spring integration | Spring 4.3 | 4.3, 5.0, 5.1, 5.2, 5.3, 6.0 -DeltaSpike Data integration | DeltaSpike 1.7 | 1.7, 1.8, 1.9 -Spring Data integration | Spring Data 1.11 | 1.11 - 2.7, 3.1 - 3.3 -Spring Data WebMvc integration | Spring Data 1.11, Spring WebMvc 4.3 | Spring Data 1.11 - 2.7, Spring WebMvc 4.3 - 5.3 -Spring Data WebFlux integration | Spring Data 2.0, Spring WebFlux 5.0 | Spring Data 2.0 - 2.7, Spring WebFlux 5.0 - 5.3 -Spring HATEOAS WebMvc integration| Spring Data 2.2, Spring WebMvc 5.2 | Spring Data 2.3+, Spring WebMvc 5.2+, Spring HATEOAS 1.0+ -Jackson integration | 2.8.11 | 2.8.11+ -GraphQL integration | 17.3 | 17.3+ -JAX-RS integration | Any JAX-RS version | Any JAX-RS version -Quarkus integration | 1.4.2 | 1.4+, 2.0+, 3.1+ +Module | Minimum version | Supported versions +---------------------------------|--------------------|-------------------- +Hibernate integration | Hibernate 6.2 | 6.2, 6.4, 6.6 +EclipseLink integration | EclipseLink 4.0 | 4.0 +Entity View CDI integration | CDI 4.0 | 4.0+ +Entity View Spring integration | Spring 6.0 | 6.0, 6.1 +DeltaSpike Data integration | DeltaSpike 2.0 | 2.0 +Spring Data integration | Spring Data 3.1 | 3.1, 3.2, 3.3 +Spring Data WebMvc integration | Spring WebMvc 6.0 | 6.0, 6.1 +Spring Data WebFlux integration | Spring WebFlux 6.0 | 6.0, 6.1 +Spring HATEOAS WebMvc integration| Spring HATEOAS 2.1 | Spring WebMvc 6.0+, Spring HATEOAS 2.1+ +Jackson integration | 2.8.11 | 2.8.11+ +GraphQL integration | 17.3 | 17.3+ +JAX-RS integration | JAX-RS 3.1 | 3.1+ +Quarkus integration | 3.2 | 3.2, 3.8, 3.15+ ## Manual setup @@ -438,12 +411,7 @@ Here some notes about setting up a local environment for testing. ## Setup general build environment -Although Blaze-Persistence still supports running on Java 7, the build must be run with at least JDK 8. -When doing a release at least a JDK 9 is required as we need to build some Multi-Release or MR JARs. -Since we try to support the latest JDK versions as well, we require developers that want to build the project with JDK 11+ to define a system property for a release build. - -The system property `jdk8.home` should be set to the path to a Java 7 or 8 installation that contains either `jre/lib/rt.jar` or `jre/lib/classes.jar`. -This property is necessary when using JDK 11+ because `sun.misc.Unsafe.defineClass` was removed. +Although Blaze-Persistence still supports running on Java 11, the build must be run with at least JDK 17. ## Building the website and documentation @@ -464,53 +432,27 @@ Click on *Check project* and checkstyle will run once for the whole project, the ## Testing a JPA provider and DBMS combination -By default, a Maven build `mvn clean install` will test against H2 and Hibernate 5.2 but you can activate different profiles to test other combinations. +By default, a Maven build `mvn clean install` will test against H2, Hibernate 6.6 and Spring Boot/Data 3.3, but you can activate different profiles to test other combinations. To test a specific combination, you need to activate at least 4 profiles * One of the JPA provider profiles - * `hibernate-6.6` + the `jakarta` profile - * `hibernate-6.5` + the `jakarta` profile - * `hibernate-6.4` + the `jakarta` profile - * `hibernate-6.3` + the `jakarta` profile - * `hibernate-6.2` + the `jakarta` profile - * `hibernate-5.6` - * `hibernate-5.5` - * `hibernate-5.4` - * `hibernate-5.3` - * `hibernate-5.2` - * `hibernate-5.1` - * `hibernate-5.0` - * `hibernate-4.3` - * `hibernate` + * `hibernate-6.6` + * `hibernate-6.4` + * `hibernate-6.2` * `eclipselink` - * `datanucleus-5.1` - * `datanucleus-5` - * `datanucleus-4` - * `openjpa` * A DBMS profile * `h2` * `postgresql` * `mysql` - * `mysql8` * `oracle` * `db2` * `mssql` - * `firebird` - * `sqllite` * A Spring data profile - * `spring-data-2.7.x` - * `spring-data-2.6.x` - * `spring-data-2.5.x` - * `spring-data-2.4.x` - * `spring-data-2.3.x` - * `spring-data-2.2.x` - * `spring-data-2.1.x` - * `spring-data-2.0.x` - * `spring-data-1.11.x` + * `spring-data-3.3.x` + * `spring-data-3.2.x` + * `spring-data-3.1.x` * A DeltaSpike profile - * `deltaspike-1.9` - * `deltaspike-1.8` - * `deltaspike-1.7` + * `deltaspike-2.0` The default DBMS connection infos are defined via Maven properties, so you can override them in a build by passing the properties as system properties. @@ -523,11 +465,6 @@ The values are defined in e.g. `core/testsuite/pom.xml` in the respective DBMS p For executing tests against a database on a dedicated host you might want to specify the following system property `-DdbHost=192.168.99.100`. -## Testing with Jakarta Persistence provider - -To build everything use `mvn -pl core/testsuite-jakarta-runner clean install -am -P "hibernate-6.2,jakarta,h2,spring-data-2.6.x,deltaspike-1.9" -DskipTests` -and to run tests use ` mvn -pl core/testsuite-jakarta-runner clean install -P "hibernate-6.2,jakarta,h2,spring-data-2.6.x,deltaspike-1.9" "-Dtest=com.blazebit.persistence.testsuite.SetOperationTest#testUnionAllOrderBySubqueryLimit"`. - ## Switching JPA provider profiles in IntelliJ When switching between Hibernate and other JPA provider profiles, IntelliJ does not unmark the `basic` or `hibernate` source directories in *core/testsuite*. @@ -538,31 +475,6 @@ If you encounter errors like _duplicate class file found_ or something alike, ma Unmarking as source root can be done by right clicking on the source directory, going to the submenu _Mark directory as_ and finally clicking _Unmark as Sources Root_. -## Using DataNucleus profiles in IntelliJ - -DataNucleus requires bytecode enhancement to work properly which requires an extra step to be able to do testing within IntelliJ. -Usually when switching the JPA provider profile, it is recommended to trigger a _Rebuild Project_ action in IntelliJ to avoid strange errors causes by previous bytecode enhancement runs. -After that, the entities in the project *core/testsuite* have to be enhanced. This is done through a Maven command. - -* DataNucleus 4: `mvn -P "datanucleus-4,h2,deltaspike-1.8,spring-data-2.0.x" -pl core/testsuite,entity-view/testsuite,integration/spring-data/testsuite/webmvc,integration/spring-data/testsuite/webflux datanucleus:enhance` -* DataNucleus 5: `mvn -P "datanucleus-5,h2,deltaspike-1.8,spring-data-2.0.x" -pl core/testsuite,entity-view/testsuite,integration/spring-data/testsuite/webmvc,integration/spring-data/testsuite/webflux datanucleus:enhance` -* DataNucleus 5.1: `mvn -P "datanucleus-5.1,h2,deltaspike-1.8,spring-data-2.0.x" -pl core/testsuite,entity-view/testsuite,integration/spring-data/testsuite/webmvc,integration/spring-data/testsuite/webflux datanucleus:enhance` - -After doing that, you should be able to execute any test in IntelliJ. - -Note that if you make changes to an entity class or add a new entity class you might need to redo the rebuild and enhancement. - -## Firebird - -When installing the 3.x version, you also need a 3.x JDBC driver. -Additionally you should add the following to the firebird.conf - -``` -WireCrypt = Enabled -``` - -After creating the DB with `create database 'localhost:test' user 'sysdba' password 'sysdba';`, you can connect with JDBC with `jdbc:firebirdsql:localhost:test?charSet=utf-8` - ## Oracle When setting up Oracle locally, keep in mind that when you connect to it, you have to set the NLS_SORT to BINARY. @@ -573,14 +485,14 @@ In IntelliJ when defining the Oracle database, go to the Advanced tab an specify The general setup required for building native images with GraalVM is described in https://quarkus.io/guides/building-native-image. -* Install GraalVM 20.2.0 (Java 11) and make sure you install the native-image tool and set `GRAALVM_HOME` environment variable +* Install GraalVM 22.3.0 (Java 17) and make sure you install the native-image tool and set `GRAALVM_HOME` environment variable * Install required packages for a C development environment * Under Windows, install [Visual Studio 2017 Visual C++ Build Tools](https://aka.ms/vs/15/release/vs_buildtools.exe) For example, run the following maven build to execute native image tests for H2: ``` -mvn -pl examples/quarkus/testsuite/native/h2 -am integration-test -Pnative,h2,spring-data-2.7.x,deltaspike-1.9 +mvn -pl examples/quarkus/testsuite/native/h2 -am integration-test -Pnative,h2,spring-data-3.3.x,deltaspike-2.0 ``` Under Windows, make sure you run maven builds that use native image from the VS2017 native tools command line. diff --git a/archetype/core-sample-jakarta/pom.xml b/archetype/core-sample-jakarta/pom.xml deleted file mode 100644 index cfce385d05..0000000000 --- a/archetype/core-sample-jakarta/pom.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - 4.0.0 - - - com.blazebit - blaze-persistence-archetype - 1.6.15-SNAPSHOT - ../pom.xml - - - blaze-persistence-archetype-core-sample-jakarta - jar - - Blazebit Persistence Archetype Core Sample Jakarta - - - com.blazebit.persistence.archetype.core.sample - - - - - - - org.apache.maven.plugins - maven-resources-plugin - - \ - - - - - - - - src/main/resources - true - - archetype-resources/pom.xml - - - - src/main/resources - false - - archetype-resources/pom.xml - - - - - diff --git a/archetype/core-sample-jakarta/src/main/resources/META-INF/maven/archetype.xml b/archetype/core-sample-jakarta/src/main/resources/META-INF/maven/archetype.xml deleted file mode 100644 index 91cfe17f0c..0000000000 --- a/archetype/core-sample-jakarta/src/main/resources/META-INF/maven/archetype.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - blaze-persistence-core-sample - - src/main/java/model/Cat.java - src/main/java/model/Person.java - - - src/main/resources/META-INF/persistence.xml - - - src/test/java/sample/AbstractSampleTest.java - src/test/java/sample/SampleTest.java - - \ No newline at end of file diff --git a/archetype/core-sample-jakarta/src/main/resources/archetype-resources/pom.xml b/archetype/core-sample-jakarta/src/main/resources/archetype-resources/pom.xml deleted file mode 100644 index 988e815f31..0000000000 --- a/archetype/core-sample-jakarta/src/main/resources/archetype-resources/pom.xml +++ /dev/null @@ -1,127 +0,0 @@ - - - - - 4.0.0 - - \${groupId} - \${artifactId} - \${version} - jar - - Blazebit Persistence Core Sample - - - UTF-8 - 11 - 11 - - ${project.version} - - - - - - com.blazebit - blaze-persistence-bom - \${version.blaze-persistence} - pom - import - - - - - - - org.hibernate - hibernate-core - 6.2.0.CR4 - - - - - com.blazebit - blaze-persistence-core-api-jakarta - - - com.blazebit - blaze-persistence-core-impl-jakarta - - - com.blazebit - blaze-persistence-integration-hibernate-6.2 - - - - jakarta.xml.bind - jakarta.xml.bind-api - 3.0.1 - provided - - - com.sun.xml.bind - jaxb-impl - 3.0.2 - provided - - - jakarta.transaction - jakarta.transaction-api - 2.0.0 - provided - - - jakarta.activation - jakarta.activation-api - 2.0.1 - provided - - - - - junit - junit - 4.11 - test - - - com.h2database - h2 - 1.4.200 - test - - - - - jdk11+ - - [11,) - - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.8.0 - - --enable-preview - - - - org.apache.maven.plugins - maven-surefire-plugin - 3.0.0-M3 - - false - --enable-preview - - - - - - - - diff --git a/archetype/core-sample-jakarta/src/main/resources/archetype-resources/src/main/resources/META-INF/persistence.xml b/archetype/core-sample-jakarta/src/main/resources/archetype-resources/src/main/resources/META-INF/persistence.xml deleted file mode 100644 index 687a9b9fb0..0000000000 --- a/archetype/core-sample-jakarta/src/main/resources/archetype-resources/src/main/resources/META-INF/persistence.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - false - - - - - - - - - - diff --git a/archetype/core-sample-jakarta/src/main/resources/archetype-resources/src/test/java/sample/AbstractSampleTest.java b/archetype/core-sample-jakarta/src/main/resources/archetype-resources/src/test/java/sample/AbstractSampleTest.java deleted file mode 100644 index 3be4a9cb15..0000000000 --- a/archetype/core-sample-jakarta/src/main/resources/archetype-resources/src/test/java/sample/AbstractSampleTest.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Blazebit - */ - -package ${package}.sample; - -import com.blazebit.persistence.Criteria; -import com.blazebit.persistence.CriteriaBuilderFactory; -import com.blazebit.persistence.spi.CriteriaBuilderConfiguration; -import java.util.function.Consumer; -import jakarta.persistence.EntityManager; -import jakarta.persistence.EntityManagerFactory; -import jakarta.persistence.EntityTransaction; -import jakarta.persistence.Persistence; -import ${package}.model.Cat; -import ${package}.model.Person; -import org.junit.After; -import org.junit.Before; - -public abstract class AbstractSampleTest { - - protected EntityManagerFactory emf; - protected CriteriaBuilderFactory cbf; - - @Before - public void init() { - emf = Persistence.createEntityManagerFactory("default"); - CriteriaBuilderConfiguration config = Criteria.getDefault(); - cbf = config.createCriteriaBuilderFactory(emf); - - transactional(em -> { - Person p1 = new Person("P1"); - Person p2 = new Person("P2"); - Person p3 = new Person("P3"); - em.persist(p1); - em.persist(p2); - em.persist(p3); - - Cat c1 = new Cat("C1", 1, p2); - Cat c2 = new Cat("C2", 2, p2); - Cat c3 = new Cat("C3", 4, p2); - - Cat c4 = new Cat("C4", 6, p3); - - Cat c5 = new Cat("C5", 8, null); - Cat c6 = new Cat("C6", 7, null); - - em.persist(c1); - em.persist(c2); - em.persist(c3); - em.persist(c4); - em.persist(c5); - em.persist(c6); - - c1.setMother(c3); - c3.getKittens().add(c1); - - c1.setFather(c5); - c5.getKittens().add(c1); - - c2.setMother(c3); - c3.getKittens().add(c2); - - c2.setFather(c6); - c6.getKittens().add(c2); - - c4.setFather(c6); - c6.getKittens().add(c4); - }); - } - - protected void transactional(Consumer consumer) { - EntityManager em = emf.createEntityManager(); - EntityTransaction tx = em.getTransaction(); - boolean success = false; - - try { - tx.begin(); - consumer.accept(em); - success = true; - } finally { - try { - if (success) { - tx.commit(); - } else { - tx.rollback(); - } - } finally { - em.close(); - } - } - } - - @After - public void destruct() { - emf.close(); - } -} diff --git a/archetype/core-sample-jakarta/src/main/resources/archetype-resources/src/test/java/sample/SampleTest.java b/archetype/core-sample-jakarta/src/main/resources/archetype-resources/src/test/java/sample/SampleTest.java deleted file mode 100644 index 9c93fe9a90..0000000000 --- a/archetype/core-sample-jakarta/src/main/resources/archetype-resources/src/test/java/sample/SampleTest.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Blazebit - */ - -package ${package}.sample; - -import com.blazebit.persistence.CriteriaBuilder; -import java.util.List; -import ${package}.model.Cat; -import ${package}.model.Person; -import org.junit.Assert; -import org.junit.Test; - -public class SampleTest extends AbstractSampleTest { - - @Test - public void sampleTest() { - transactional(em -> { - CriteriaBuilder cb = cbf.create(em, Person.class); - cb.from(Cat.class, "cat"); - cb.where("cat.owner").isNotNull(); - cb.select("cat.owner"); - cb.distinct(); - List list = cb.getResultList(); - - System.out.println(list); - Assert.assertEquals(2, list.size()); - }); - } -} diff --git a/archetype/core-sample/pom.xml b/archetype/core-sample/pom.xml index 294411f088..0c795e427c 100644 --- a/archetype/core-sample/pom.xml +++ b/archetype/core-sample/pom.xml @@ -10,7 +10,7 @@ com.blazebit blaze-persistence-archetype - 1.6.15-SNAPSHOT + 2.0.0-SNAPSHOT ../pom.xml diff --git a/archetype/core-sample/src/main/resources/archetype-resources/pom.xml b/archetype/core-sample/src/main/resources/archetype-resources/pom.xml index 342cd0618c..5d572c7247 100644 --- a/archetype/core-sample/src/main/resources/archetype-resources/pom.xml +++ b/archetype/core-sample/src/main/resources/archetype-resources/pom.xml @@ -16,8 +16,8 @@ UTF-8 - 1.8 - 1.8 + 11 + 11 ${project.version} @@ -36,9 +36,9 @@ - org.hibernate - hibernate-entitymanager - 5.2.8.Final + org.hibernate.orm + hibernate-core + ${version.hibernate-6.6} @@ -52,83 +52,86 @@ com.blazebit - blaze-persistence-integration-hibernate-5.2 + blaze-persistence-integration-hibernate-6.2 - + + jakarta.persistence + jakarta.persistence-api + ${version.jpa-api} + provided + + + jakarta.transaction + jakarta.transaction-api + ${version.jta-api} + provided + + + jakarta.validation + jakarta.validation-api + ${version.validation-api} + provided + jakarta.xml.bind jakarta.xml.bind-api - 2.3.3 + ${version.jaxb-api} provided com.sun.xml.bind jaxb-impl - 2.3.3 + ${version.jaxb} provided - jakarta.transaction - jakarta.transaction-api - 1.3.3 + jakarta.annotation + jakarta.annotation-api + ${version.annotation-api} provided jakarta.activation jakarta.activation-api - 1.2.2 + ${version.activation-api} provided - - jakarta.annotation - jakarta.annotation-api - 1.3.5 - provided - - + - junit - junit - 4.11 + org.junit.jupiter + junit-jupiter + ${version.junit-jupiter} test com.h2database h2 - 1.4.200 + ${h2.version} test - - - jdk11+ - - [11,) - - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.8.0 - - --enable-preview - - - - org.apache.maven.plugins - maven-surefire-plugin - 3.0.0-M3 - - false - --enable-preview - - - - - - + + + + org.apache.maven.plugins + maven-compiler-plugin + ${version.compiler.plugin} + + --enable-preview + + + + org.apache.maven.plugins + maven-surefire-plugin + ${version.surefire.plugin} + + false + --enable-preview + + + + diff --git a/archetype/core-sample/src/main/resources/archetype-resources/src/main/java/model/Cat.java b/archetype/core-sample/src/main/resources/archetype-resources/src/main/java/model/Cat.java index abdb90ab73..427a8c3df9 100644 --- a/archetype/core-sample/src/main/resources/archetype-resources/src/main/java/model/Cat.java +++ b/archetype/core-sample/src/main/resources/archetype-resources/src/main/java/model/Cat.java @@ -7,12 +7,12 @@ import java.util.HashSet; import java.util.Set; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.GeneratedValue; -import javax.persistence.Id; -import javax.persistence.ManyToMany; -import javax.persistence.ManyToOne; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.Id; +import jakarta.persistence.ManyToMany; +import jakarta.persistence.ManyToOne; @Entity public class Cat { diff --git a/archetype/core-sample/src/main/resources/archetype-resources/src/main/java/model/Person.java b/archetype/core-sample/src/main/resources/archetype-resources/src/main/java/model/Person.java index 6e55200ef6..add2b18d41 100644 --- a/archetype/core-sample/src/main/resources/archetype-resources/src/main/java/model/Person.java +++ b/archetype/core-sample/src/main/resources/archetype-resources/src/main/java/model/Person.java @@ -7,10 +7,10 @@ import java.util.HashSet; import java.util.Set; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.Id; -import javax.persistence.OneToMany; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.Id; +import jakarta.persistence.OneToMany; @Entity public class Person { diff --git a/archetype/core-sample/src/main/resources/archetype-resources/src/main/resources/META-INF/persistence.xml b/archetype/core-sample/src/main/resources/archetype-resources/src/main/resources/META-INF/persistence.xml index 3a07cacc0b..687a9b9fb0 100644 --- a/archetype/core-sample/src/main/resources/archetype-resources/src/main/resources/META-INF/persistence.xml +++ b/archetype/core-sample/src/main/resources/archetype-resources/src/main/resources/META-INF/persistence.xml @@ -3,17 +3,17 @@ SPDX-License-Identifier: Apache-2.0 Copyright Blazebit --> - + false - - - - - + + + + + diff --git a/archetype/core-sample/src/main/resources/archetype-resources/src/test/java/sample/AbstractSampleTest.java b/archetype/core-sample/src/main/resources/archetype-resources/src/test/java/sample/AbstractSampleTest.java index c0fb8bb244..269db4070e 100644 --- a/archetype/core-sample/src/main/resources/archetype-resources/src/test/java/sample/AbstractSampleTest.java +++ b/archetype/core-sample/src/main/resources/archetype-resources/src/test/java/sample/AbstractSampleTest.java @@ -9,21 +9,21 @@ import com.blazebit.persistence.CriteriaBuilderFactory; import com.blazebit.persistence.spi.CriteriaBuilderConfiguration; import java.util.function.Consumer; -import javax.persistence.EntityManager; -import javax.persistence.EntityManagerFactory; -import javax.persistence.EntityTransaction; -import javax.persistence.Persistence; +import jakarta.persistence.EntityManager; +import jakarta.persistence.EntityManagerFactory; +import jakarta.persistence.EntityTransaction; +import jakarta.persistence.Persistence; import ${package}.model.Cat; import ${package}.model.Person; -import org.junit.After; -import org.junit.Before; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; public abstract class AbstractSampleTest { protected EntityManagerFactory emf; protected CriteriaBuilderFactory cbf; - @Before + @BeforeEach public void init() { emf = Persistence.createEntityManagerFactory("default"); CriteriaBuilderConfiguration config = Criteria.getDefault(); @@ -92,7 +92,7 @@ protected void transactional(Consumer consumer) { } } - @After + @AfterEach public void destruct() { emf.close(); } diff --git a/archetype/core-sample/src/main/resources/archetype-resources/src/test/java/sample/SampleTest.java b/archetype/core-sample/src/main/resources/archetype-resources/src/test/java/sample/SampleTest.java index 9c93fe9a90..2b5d361530 100644 --- a/archetype/core-sample/src/main/resources/archetype-resources/src/test/java/sample/SampleTest.java +++ b/archetype/core-sample/src/main/resources/archetype-resources/src/test/java/sample/SampleTest.java @@ -9,8 +9,8 @@ import java.util.List; import ${package}.model.Cat; import ${package}.model.Person; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.*; public class SampleTest extends AbstractSampleTest { @@ -25,7 +25,7 @@ public void sampleTest() { List list = cb.getResultList(); System.out.println(list); - Assert.assertEquals(2, list.size()); + assertEquals(2, list.size()); }); } } diff --git a/archetype/deltaspike-data-sample/pom.xml b/archetype/deltaspike-data-sample/pom.xml index 4fac22977a..208103a18e 100644 --- a/archetype/deltaspike-data-sample/pom.xml +++ b/archetype/deltaspike-data-sample/pom.xml @@ -7,7 +7,7 @@ blaze-persistence-archetype com.blazebit - 1.6.15-SNAPSHOT + 2.0.0-SNAPSHOT ../pom.xml 4.0.0 diff --git a/archetype/deltaspike-data-sample/src/main/resources/META-INF/maven/archetype.xml b/archetype/deltaspike-data-sample/src/main/resources/META-INF/maven/archetype.xml index 1585c4b5f4..41b1ac3afa 100644 --- a/archetype/deltaspike-data-sample/src/main/resources/META-INF/maven/archetype.xml +++ b/archetype/deltaspike-data-sample/src/main/resources/META-INF/maven/archetype.xml @@ -24,7 +24,7 @@ src/main/resources/META-INF/persistence.xml src/main/resources/META-INF/beans.xml src/test/resources/META-INF/beans.xml - src/test/resources/META-INF/services/javax.enterprise.inject.spi.Extension + src/test/resources/META-INF/services/jakarta.enterprise.inject.spi.Extension src/test/java/sample/AbstractSampleTest.java diff --git a/archetype/deltaspike-data-sample/src/main/resources/archetype-resources/pom.xml b/archetype/deltaspike-data-sample/src/main/resources/archetype-resources/pom.xml index b0f38babec..92e2020998 100644 --- a/archetype/deltaspike-data-sample/src/main/resources/archetype-resources/pom.xml +++ b/archetype/deltaspike-data-sample/src/main/resources/archetype-resources/pom.xml @@ -15,16 +15,14 @@ UTF-8 - 1.8 - 1.8 + 11 + 11 ${project.version} - 1.9.3 - 2.4.5.Final - 5.0.12.Final - - 5 - 2.6.4 + ${version.deltaspike-2.0} + ${version.weld} + ${version.hibernate-6.6} + ${version.eclipselink} @@ -55,34 +53,24 @@ org.apache.maven.plugins maven-compiler-plugin - 3.8.0 + ${version.compiler.plugin} - - + --enable-preview org.apache.maven.plugins maven-surefire-plugin - 3.0.0-M3 + ${version.surefire.plugin} false - - + --enable-preview - - org.jboss.spec - jboss-javaee-7.0 - 1.1.0.Final - pom - provided - - com.blazebit @@ -128,42 +116,90 @@ ${project.groupId} - blaze-persistence-integration-deltaspike-data-impl-1.8 + blaze-persistence-integration-deltaspike-data-impl-2.0 com.blazebit blaze-persistence-entity-view-processor - + + + jakarta.persistence + jakarta.persistence-api + ${version.jpa-api} + provided + + + jakarta.transaction + jakarta.transaction-api + ${version.jta-api} + provided + + + jakarta.interceptor + jakarta.interceptor-api + ${version.interceptor-api} + provided + + + jakarta.inject + jakarta.inject-api + ${version.atinject-api} + provided + + + jakarta.enterprise + jakarta.enterprise.cdi-api + ${version.cdi-api} + provided + + + jakarta.el + jakarta.el-api + ${version.el-api} + provided + + + jakarta.ws.rs + jakarta.ws.rs-api + ${version.jaxrs-api} + provided + + + jakarta.validation + jakarta.validation-api + ${version.validation-api} + provided + jakarta.xml.bind jakarta.xml.bind-api - 2.3.1 + ${version.jaxb-api} provided com.sun.xml.bind jaxb-impl - 2.3.3 + ${version.jaxb} provided - jakarta.transaction - jakarta.transaction-api - 1.3.3 + jakarta.annotation + jakarta.annotation-api + ${version.annotation-api} provided jakarta.activation jakarta.activation-api - 1.2.2 + ${version.activation-api} provided - jakarta.annotation - jakarta.annotation-api - 1.3.5 + jakarta.ejb + jakarta.ejb-api + ${version.ejb-api} provided @@ -188,30 +224,17 @@ weld-se-core \${version.weld} test - - - org.jboss - jandex - - - - - - org.jboss - jandex - 2.0.4.Final - test - junit - junit - 4.11 + org.junit.jupiter + junit-jupiter + ${version.junit-jupiter} test com.h2database h2 - 1.4.200 + ${h2.version} test @@ -224,18 +247,18 @@ com.blazebit - blaze-persistence-integration-hibernate-${version.integration-hibernate} + blaze-persistence-integration-hibernate-6.2 - org.hibernate - hibernate-entitymanager + org.hibernate.orm + hibernate-core \${version.hibernate} test - org.hibernate + org.hibernate.orm hibernate-jpamodelgen \${version.hibernate} provided @@ -244,55 +267,26 @@ - org.bsc.maven - maven-processor-plugin - - - process - - process - - generate-sources - - - \${project.build.directory}/metamodel - - org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor - com.blazebit.persistence.view.processor.EntityViewAnnotationProcessor - - - - - - - - org.hibernate - hibernate-jpamodelgen - \${version.hibernate} - - - com.blazebit - blaze-persistence-entity-view-processor - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - add-source-metamodel - generate-sources - - add-source - - - - \${project.build.directory}/metamodel - - - - + maven-compiler-plugin + + + + + org.hibernate.orm + hibernate-jpamodelgen + \${version.hibernate} + + + com.blazebit + blaze-persistence-entity-view-processor + \${version.blaze-persistence} + + + + org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor + com.blazebit.persistence.view.processor.EntityViewAnnotationProcessor + + @@ -304,12 +298,6 @@ com.blazebit blaze-persistence-integration-eclipselink - - org.eclipse.persistence - javax.persistence - 2.1.1 - test - org.eclipse.persistence eclipselink @@ -328,54 +316,24 @@ - org.codehaus.mojo - build-helper-maven-plugin - - - add-source - generate-sources - - add-source - - - - \${additional.source.directory} - \${project.build.directory}/generated-sources/metamodel - - - - - - - org.bsc.maven - maven-processor-plugin - - - process - - process - - generate-sources - - - \${project.build.directory}/generated-sources/metamodel - - org.eclipse.persistence.internal.jpa.modelgen.CanonicalModelProcessor - - - \${basedir}/src/main/resources/META-INF/persistence.xml - - - - - - - - org.eclipse.persistence - org.eclipse.persistence.jpa.modelgen.processor - \${version.eclipselink} - - + maven-compiler-plugin + + + + + org.eclipse.persistence + org.eclipse.persistence.jpa.modelgen.processor + \${version.eclipselink} + + + + -Aeclipselink.persistencexml=\${basedir}/src/main/resources/META-INF/persistence.xml + -Aeclipselink.canonicalmodel.use_generated=false + + + org.eclipse.persistence.internal.jpa.modelgen.CanonicalModelProcessor + + diff --git a/archetype/deltaspike-data-sample/src/main/resources/archetype-resources/src/main/java/Application.java b/archetype/deltaspike-data-sample/src/main/resources/archetype-resources/src/main/java/Application.java index 3ed0d9f2fb..3db90a1539 100644 --- a/archetype/deltaspike-data-sample/src/main/resources/archetype-resources/src/main/java/Application.java +++ b/archetype/deltaspike-data-sample/src/main/resources/archetype-resources/src/main/java/Application.java @@ -5,9 +5,9 @@ package ${package}; -import javax.ws.rs.ApplicationPath; +import jakarta.ws.rs.ApplicationPath; @ApplicationPath("/") -public class Application extends javax.ws.rs.core.Application { +public class Application extends jakarta.ws.rs.core.Application { } \ No newline at end of file diff --git a/archetype/deltaspike-data-sample/src/main/resources/archetype-resources/src/main/java/config/CriteriaBuilderFactoryProducer.java b/archetype/deltaspike-data-sample/src/main/resources/archetype-resources/src/main/java/config/CriteriaBuilderFactoryProducer.java index 6e0117d850..d864a9da88 100644 --- a/archetype/deltaspike-data-sample/src/main/resources/archetype-resources/src/main/java/config/CriteriaBuilderFactoryProducer.java +++ b/archetype/deltaspike-data-sample/src/main/resources/archetype-resources/src/main/java/config/CriteriaBuilderFactoryProducer.java @@ -9,14 +9,14 @@ import com.blazebit.persistence.CriteriaBuilderFactory; import com.blazebit.persistence.spi.CriteriaBuilderConfiguration; -import javax.enterprise.context.ApplicationScoped; -import javax.enterprise.inject.Produces; -import javax.annotation.PostConstruct; -import javax.inject.Inject; -import javax.persistence.EntityManagerFactory; - -@javax.ejb.Singleton -@javax.ejb.Startup +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.enterprise.inject.Produces; +import jakarta.annotation.PostConstruct; +import jakarta.inject.Inject; +import jakarta.persistence.EntityManagerFactory; + +@jakarta.ejb.Singleton +@jakarta.ejb.Startup public class CriteriaBuilderFactoryProducer { // inject your entity manager factory diff --git a/archetype/deltaspike-data-sample/src/main/resources/archetype-resources/src/main/java/config/EntityManagerProducer.java b/archetype/deltaspike-data-sample/src/main/resources/archetype-resources/src/main/java/config/EntityManagerProducer.java index 6afb05f4d9..3ffcd36275 100644 --- a/archetype/deltaspike-data-sample/src/main/resources/archetype-resources/src/main/java/config/EntityManagerProducer.java +++ b/archetype/deltaspike-data-sample/src/main/resources/archetype-resources/src/main/java/config/EntityManagerProducer.java @@ -5,14 +5,14 @@ package ${package}.config; -import javax.enterprise.inject.Produces; -import javax.persistence.EntityManager; -import javax.persistence.EntityManagerFactory; -import javax.persistence.PersistenceContext; -import javax.persistence.PersistenceUnit; +import jakarta.enterprise.inject.Produces; +import jakarta.persistence.EntityManager; +import jakarta.persistence.EntityManagerFactory; +import jakarta.persistence.PersistenceContext; +import jakarta.persistence.PersistenceUnit; -@javax.ejb.Singleton -@javax.ejb.Startup +@jakarta.ejb.Singleton +@jakarta.ejb.Startup public class EntityManagerProducer { // inject your entity manager factory diff --git a/archetype/deltaspike-data-sample/src/main/resources/archetype-resources/src/main/java/config/EntityViewManagerProducer.java b/archetype/deltaspike-data-sample/src/main/resources/archetype-resources/src/main/java/config/EntityViewManagerProducer.java index 628f192bd2..5473cfc014 100644 --- a/archetype/deltaspike-data-sample/src/main/resources/archetype-resources/src/main/java/config/EntityViewManagerProducer.java +++ b/archetype/deltaspike-data-sample/src/main/resources/archetype-resources/src/main/java/config/EntityViewManagerProducer.java @@ -9,13 +9,13 @@ import com.blazebit.persistence.view.EntityViewManager; import com.blazebit.persistence.view.spi.EntityViewConfiguration; -import javax.enterprise.context.ApplicationScoped; -import javax.enterprise.inject.Produces; -import javax.inject.Inject; -import javax.annotation.PostConstruct; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.enterprise.inject.Produces; +import jakarta.inject.Inject; +import jakarta.annotation.PostConstruct; -@javax.ejb.Singleton -@javax.ejb.Startup +@jakarta.ejb.Singleton +@jakarta.ejb.Startup public class EntityViewManagerProducer { // inject the configuration provided by the cdi integration diff --git a/archetype/deltaspike-data-sample/src/main/resources/archetype-resources/src/main/java/controller/SampleController.java b/archetype/deltaspike-data-sample/src/main/resources/archetype-resources/src/main/java/controller/SampleController.java index eaabde7d84..40622cf00b 100644 --- a/archetype/deltaspike-data-sample/src/main/resources/archetype-resources/src/main/java/controller/SampleController.java +++ b/archetype/deltaspike-data-sample/src/main/resources/archetype-resources/src/main/java/controller/SampleController.java @@ -6,10 +6,10 @@ package ${package}.controller; import ${package}.repository.CatSimpleViewRepository; -import javax.inject.Inject; -import javax.ws.rs.GET; -import javax.ws.rs.Produces; -import javax.ws.rs.Path; +import jakarta.inject.Inject; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.Path; @Path("/") public class SampleController { diff --git a/archetype/deltaspike-data-sample/src/main/resources/archetype-resources/src/main/java/model/Cat.java b/archetype/deltaspike-data-sample/src/main/resources/archetype-resources/src/main/java/model/Cat.java index abdb90ab73..427a8c3df9 100644 --- a/archetype/deltaspike-data-sample/src/main/resources/archetype-resources/src/main/java/model/Cat.java +++ b/archetype/deltaspike-data-sample/src/main/resources/archetype-resources/src/main/java/model/Cat.java @@ -7,12 +7,12 @@ import java.util.HashSet; import java.util.Set; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.GeneratedValue; -import javax.persistence.Id; -import javax.persistence.ManyToMany; -import javax.persistence.ManyToOne; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.Id; +import jakarta.persistence.ManyToMany; +import jakarta.persistence.ManyToOne; @Entity public class Cat { diff --git a/archetype/deltaspike-data-sample/src/main/resources/archetype-resources/src/main/java/model/Person.java b/archetype/deltaspike-data-sample/src/main/resources/archetype-resources/src/main/java/model/Person.java index 6e55200ef6..add2b18d41 100644 --- a/archetype/deltaspike-data-sample/src/main/resources/archetype-resources/src/main/java/model/Person.java +++ b/archetype/deltaspike-data-sample/src/main/resources/archetype-resources/src/main/java/model/Person.java @@ -7,10 +7,10 @@ import java.util.HashSet; import java.util.Set; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.Id; -import javax.persistence.OneToMany; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.Id; +import jakarta.persistence.OneToMany; @Entity public class Person { diff --git a/archetype/deltaspike-data-sample/src/main/resources/archetype-resources/src/main/resources/META-INF/beans.xml b/archetype/deltaspike-data-sample/src/main/resources/archetype-resources/src/main/resources/META-INF/beans.xml index dc74ca17f4..dc988397a1 100644 --- a/archetype/deltaspike-data-sample/src/main/resources/archetype-resources/src/main/resources/META-INF/beans.xml +++ b/archetype/deltaspike-data-sample/src/main/resources/archetype-resources/src/main/resources/META-INF/beans.xml @@ -3,6 +3,9 @@ SPDX-License-Identifier: Apache-2.0 Copyright Blazebit --> - + \ No newline at end of file diff --git a/archetype/deltaspike-data-sample/src/main/resources/archetype-resources/src/main/resources/META-INF/persistence.xml b/archetype/deltaspike-data-sample/src/main/resources/archetype-resources/src/main/resources/META-INF/persistence.xml index 9ae1c0f769..4c9bb3dcd3 100644 --- a/archetype/deltaspike-data-sample/src/main/resources/archetype-resources/src/main/resources/META-INF/persistence.xml +++ b/archetype/deltaspike-data-sample/src/main/resources/archetype-resources/src/main/resources/META-INF/persistence.xml @@ -9,11 +9,11 @@ false - - - - - + + + + + diff --git a/archetype/deltaspike-data-sample/src/main/resources/archetype-resources/src/test/java/sample/AbstractSampleTest.java b/archetype/deltaspike-data-sample/src/main/resources/archetype-resources/src/test/java/sample/AbstractSampleTest.java index 59342c1367..6383baa8f5 100644 --- a/archetype/deltaspike-data-sample/src/main/resources/archetype-resources/src/test/java/sample/AbstractSampleTest.java +++ b/archetype/deltaspike-data-sample/src/main/resources/archetype-resources/src/test/java/sample/AbstractSampleTest.java @@ -14,20 +14,20 @@ import org.apache.deltaspike.cdise.api.CdiContainerLoader; import org.apache.deltaspike.core.api.provider.BeanProvider; import java.util.function.Consumer; -import javax.persistence.EntityManager; -import javax.persistence.EntityManagerFactory; -import javax.persistence.EntityTransaction; -import javax.persistence.Persistence; +import jakarta.persistence.EntityManager; +import jakarta.persistence.EntityManagerFactory; +import jakarta.persistence.EntityTransaction; +import jakarta.persistence.Persistence; import ${package}.model.Cat; import ${package}.model.Person; import ${package}.view.CatSimpleView; import ${package}.view.CatWithOwnerView; import ${package}.view.PersonSimpleView; -import javax.inject.Inject; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.BeforeClass; +import jakarta.inject.Inject; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.BeforeEach; public abstract class AbstractSampleTest { @@ -40,13 +40,13 @@ public abstract class AbstractSampleTest { @Inject protected EntityViewManager evm; - @BeforeClass + @BeforeAll public static void bootContainer() { CdiContainer container = CdiContainerLoader.getCdiContainer(); container.boot(); } - @AfterClass + @AfterAll public static void shutdownContainer() { CdiContainer container = CdiContainerLoader.getCdiContainer(); container.shutdown(); @@ -58,13 +58,13 @@ public void startContexts() { BeanProvider.injectFields(this); } - @After + @AfterEach public void stopContexts() { CdiContainer container = CdiContainerLoader.getCdiContainer(); container.getContextControl().stopContexts(); } - @Before + @BeforeEach public void init() { startContexts(); transactional(em -> { diff --git a/archetype/deltaspike-data-sample/src/main/resources/archetype-resources/src/test/java/sample/EntityManagerFactoryHolder.java b/archetype/deltaspike-data-sample/src/main/resources/archetype-resources/src/test/java/sample/EntityManagerFactoryHolder.java index a779475ef1..f5acf6407e 100644 --- a/archetype/deltaspike-data-sample/src/main/resources/archetype-resources/src/test/java/sample/EntityManagerFactoryHolder.java +++ b/archetype/deltaspike-data-sample/src/main/resources/archetype-resources/src/test/java/sample/EntityManagerFactoryHolder.java @@ -5,15 +5,15 @@ package ${package}.sample; -import javax.annotation.PostConstruct; -import javax.annotation.PreDestroy; -import javax.enterprise.context.ApplicationScoped; -import javax.enterprise.context.RequestScoped; -import javax.enterprise.inject.Produces; -import javax.enterprise.inject.Disposes; -import javax.persistence.EntityManager; -import javax.persistence.EntityManagerFactory; -import javax.persistence.Persistence; +import jakarta.annotation.PostConstruct; +import jakarta.annotation.PreDestroy; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.enterprise.context.RequestScoped; +import jakarta.enterprise.inject.Produces; +import jakarta.enterprise.inject.Disposes; +import jakarta.persistence.EntityManager; +import jakarta.persistence.EntityManagerFactory; +import jakarta.persistence.Persistence; /** * Workaround for WELD-2245 which prevents the use of @ApplicationScoped for EntityManagerFactory directly diff --git a/archetype/deltaspike-data-sample/src/main/resources/archetype-resources/src/test/java/sample/SampleTest.java b/archetype/deltaspike-data-sample/src/main/resources/archetype-resources/src/test/java/sample/SampleTest.java index 40270ca4c7..6428cc9294 100644 --- a/archetype/deltaspike-data-sample/src/main/resources/archetype-resources/src/test/java/sample/SampleTest.java +++ b/archetype/deltaspike-data-sample/src/main/resources/archetype-resources/src/test/java/sample/SampleTest.java @@ -14,9 +14,9 @@ import ${package}.view.CatWithOwnerView; import ${package}.view.PersonSimpleView; import ${package}.repository.CatSimpleViewRepository; -import javax.inject.Inject; -import org.junit.Assert; -import org.junit.Test; +import jakarta.inject.Inject; +import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.*; public class SampleTest extends AbstractSampleTest { @@ -29,7 +29,7 @@ public void sampleTest() { List list = catRepository.getWithOwnerView(); System.out.println(list); - Assert.assertEquals(6, list.size()); + assertEquals(6, list.size()); }); } } diff --git a/archetype/deltaspike-data-sample/src/main/resources/archetype-resources/src/test/java/sample/TestExtension.java b/archetype/deltaspike-data-sample/src/main/resources/archetype-resources/src/test/java/sample/TestExtension.java index 3b7da685c8..62d90eae86 100644 --- a/archetype/deltaspike-data-sample/src/main/resources/archetype-resources/src/test/java/sample/TestExtension.java +++ b/archetype/deltaspike-data-sample/src/main/resources/archetype-resources/src/test/java/sample/TestExtension.java @@ -7,9 +7,9 @@ import ${package}.config.EntityManagerProducer; -import javax.enterprise.event.Observes; -import javax.enterprise.inject.spi.Extension; -import javax.enterprise.inject.spi.ProcessAnnotatedType; +import jakarta.enterprise.event.Observes; +import jakarta.enterprise.inject.spi.Extension; +import jakarta.enterprise.inject.spi.ProcessAnnotatedType; /** * In the test, we have to produce the EntityManagerFactory and EntityManager manually diff --git a/archetype/deltaspike-data-sample/src/main/resources/archetype-resources/src/test/resources/META-INF/beans.xml b/archetype/deltaspike-data-sample/src/main/resources/archetype-resources/src/test/resources/META-INF/beans.xml index dc74ca17f4..dc988397a1 100644 --- a/archetype/deltaspike-data-sample/src/main/resources/archetype-resources/src/test/resources/META-INF/beans.xml +++ b/archetype/deltaspike-data-sample/src/main/resources/archetype-resources/src/test/resources/META-INF/beans.xml @@ -3,6 +3,9 @@ SPDX-License-Identifier: Apache-2.0 Copyright Blazebit --> - + \ No newline at end of file diff --git a/archetype/deltaspike-data-sample/src/main/resources/archetype-resources/src/test/resources/META-INF/services/javax.enterprise.inject.spi.Extension b/archetype/deltaspike-data-sample/src/main/resources/archetype-resources/src/test/resources/META-INF/services/jakarta.enterprise.inject.spi.Extension similarity index 100% rename from archetype/deltaspike-data-sample/src/main/resources/archetype-resources/src/test/resources/META-INF/services/javax.enterprise.inject.spi.Extension rename to archetype/deltaspike-data-sample/src/main/resources/archetype-resources/src/test/resources/META-INF/services/jakarta.enterprise.inject.spi.Extension diff --git a/archetype/entity-view-sample-jakarta/pom.xml b/archetype/entity-view-sample-jakarta/pom.xml deleted file mode 100644 index d743114434..0000000000 --- a/archetype/entity-view-sample-jakarta/pom.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - 4.0.0 - - - com.blazebit - blaze-persistence-archetype - 1.6.15-SNAPSHOT - ../pom.xml - - - blaze-persistence-archetype-entity-view-sample-jakarta - jar - - Blazebit Persistence Archetype Entity-View Sample Jakarta - - - com.blazebit.persistence.archetype.view.sample - - - - - - - org.apache.maven.plugins - maven-resources-plugin - - \ - - - - - - - - src/main/resources - true - - archetype-resources/pom.xml - - - - src/main/resources - false - - archetype-resources/pom.xml - - - - - diff --git a/archetype/entity-view-sample-jakarta/src/main/resources/META-INF/maven/archetype.xml b/archetype/entity-view-sample-jakarta/src/main/resources/META-INF/maven/archetype.xml deleted file mode 100644 index 863e09503a..0000000000 --- a/archetype/entity-view-sample-jakarta/src/main/resources/META-INF/maven/archetype.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - blaze-persistence-entity-view-sample - - src/main/java/model/Cat.java - src/main/java/model/Person.java - src/main/java/view/CatSimpleView.java - src/main/java/view/CatWithOwnerView.java - src/main/java/view/PersonSimpleView.java - - - src/main/resources/META-INF/persistence.xml - - - src/test/java/sample/AbstractSampleTest.java - src/test/java/sample/SampleTest.java - - \ No newline at end of file diff --git a/archetype/entity-view-sample-jakarta/src/main/resources/archetype-resources/pom.xml b/archetype/entity-view-sample-jakarta/src/main/resources/archetype-resources/pom.xml deleted file mode 100644 index 118c934b1e..0000000000 --- a/archetype/entity-view-sample-jakarta/src/main/resources/archetype-resources/pom.xml +++ /dev/null @@ -1,142 +0,0 @@ - - - - - 4.0.0 - - \${groupId} - \${artifactId} - \${version} - jar - - Blazebit Persistence Entity View Sample - - - UTF-8 - 11 - 11 - - ${project.version} - - - - - - com.blazebit - blaze-persistence-bom - \${version.blaze-persistence} - pom - import - - - - - - - org.hibernate - hibernate-core - 6.2.0.CR4 - - - - - com.blazebit - blaze-persistence-core-api-jakarta - - - com.blazebit - blaze-persistence-core-impl-jakarta - - - com.blazebit - blaze-persistence-integration-hibernate-6.2 - - - - - com.blazebit - blaze-persistence-entity-view-api-jakarta - - - com.blazebit - blaze-persistence-entity-view-impl-jakarta - - - com.blazebit - blaze-persistence-entity-view-processor-jakarta - - - - - jakarta.xml.bind - jakarta.xml.bind-api - 3.0.1 - provided - - - com.sun.xml.bind - jaxb-impl - 3.0.2 - provided - - - jakarta.transaction - jakarta.transaction-api - 2.0.0 - provided - - - jakarta.activation - jakarta.activation-api - 2.0.1 - provided - - - - - junit - junit - 4.11 - test - - - com.h2database - h2 - 1.4.200 - test - - - - - jdk11+ - - [11,) - - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.8.0 - - --enable-preview - - - - org.apache.maven.plugins - maven-surefire-plugin - 3.0.0-M3 - - false - --enable-preview - - - - - - - - diff --git a/archetype/entity-view-sample-jakarta/src/main/resources/archetype-resources/src/main/java/model/Cat.java b/archetype/entity-view-sample-jakarta/src/main/resources/archetype-resources/src/main/java/model/Cat.java deleted file mode 100644 index 427a8c3df9..0000000000 --- a/archetype/entity-view-sample-jakarta/src/main/resources/archetype-resources/src/main/java/model/Cat.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Blazebit - */ - -package ${package}.model; - -import java.util.HashSet; -import java.util.Set; -import jakarta.persistence.Entity; -import jakarta.persistence.FetchType; -import jakarta.persistence.GeneratedValue; -import jakarta.persistence.Id; -import jakarta.persistence.ManyToMany; -import jakarta.persistence.ManyToOne; - -@Entity -public class Cat { - - @Id - @GeneratedValue - private Long id; - private String name; - private Integer age; - @ManyToOne(fetch = FetchType.LAZY, optional = true) - private Person owner; - @ManyToOne(fetch = FetchType.LAZY, optional = true) - private Cat mother; - @ManyToOne(fetch = FetchType.LAZY, optional = true) - private Cat father; - @ManyToMany - private Set kittens = new HashSet<>(); - - public Cat() { - } - - public Cat(String name, Integer age, Person owner) { - this.name = name; - this.age = age; - this.owner = owner; - } - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public Integer getAge() { - return age; - } - - public void setAge(Integer age) { - this.age = age; - } - - public Person getOwner() { - return owner; - } - - public void setOwner(Person owner) { - this.owner = owner; - } - - public Cat getMother() { - return mother; - } - - public void setMother(Cat mother) { - this.mother = mother; - } - - public Cat getFather() { - return father; - } - - public void setFather(Cat father) { - this.father = father; - } - - public Set getKittens() { - return kittens; - } - - public void setKittens(Set kittens) { - this.kittens = kittens; - } -} diff --git a/archetype/entity-view-sample-jakarta/src/main/resources/archetype-resources/src/main/java/model/Person.java b/archetype/entity-view-sample-jakarta/src/main/resources/archetype-resources/src/main/java/model/Person.java deleted file mode 100644 index add2b18d41..0000000000 --- a/archetype/entity-view-sample-jakarta/src/main/resources/archetype-resources/src/main/java/model/Person.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Blazebit - */ - -package ${package}.model; - -import java.util.HashSet; -import java.util.Set; -import jakarta.persistence.Entity; -import jakarta.persistence.GeneratedValue; -import jakarta.persistence.Id; -import jakarta.persistence.OneToMany; - -@Entity -public class Person { - - @Id - @GeneratedValue - private Long id; - private String name; - @OneToMany(mappedBy = "owner") - private Set kittens = new HashSet<>(); - - public Person() { - } - - public Person(String name) { - this.name = name; - } - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public Set getKittens() { - return kittens; - } - - public void setKittens(Set kittens) { - this.kittens = kittens; - } -} diff --git a/archetype/entity-view-sample-jakarta/src/main/resources/archetype-resources/src/test/java/sample/AbstractSampleTest.java b/archetype/entity-view-sample-jakarta/src/main/resources/archetype-resources/src/test/java/sample/AbstractSampleTest.java deleted file mode 100644 index 58f425a577..0000000000 --- a/archetype/entity-view-sample-jakarta/src/main/resources/archetype-resources/src/test/java/sample/AbstractSampleTest.java +++ /dev/null @@ -1,116 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Blazebit - */ - -package ${package}.sample; - -import com.blazebit.persistence.Criteria; -import com.blazebit.persistence.CriteriaBuilderFactory; -import com.blazebit.persistence.spi.CriteriaBuilderConfiguration; -import com.blazebit.persistence.view.EntityViews; -import com.blazebit.persistence.view.EntityViewManager; -import com.blazebit.persistence.view.spi.EntityViewConfiguration; -import java.util.function.Consumer; -import jakarta.persistence.EntityManager; -import jakarta.persistence.EntityManagerFactory; -import jakarta.persistence.EntityTransaction; -import jakarta.persistence.Persistence; -import ${package}.model.Cat; -import ${package}.model.Person; -import ${package}.view.CatSimpleView; -import ${package}.view.CatWithOwnerView; -import ${package}.view.PersonSimpleView; -import org.junit.After; -import org.junit.Before; - -public abstract class AbstractSampleTest { - - protected EntityManagerFactory emf; - protected CriteriaBuilderFactory cbf; - protected EntityViewManager evm; - - @Before - public void init() { - emf = Persistence.createEntityManagerFactory("default"); - CriteriaBuilderConfiguration config = Criteria.getDefault(); - cbf = config.createCriteriaBuilderFactory(emf); - - EntityViewConfiguration entityViewConfiguration = EntityViews.createDefaultConfiguration(); - - for (Class entityViewClazz : getEntityViewClasses()) { - entityViewConfiguration.addEntityView(entityViewClazz); - } - - evm = entityViewConfiguration.createEntityViewManager(cbf); - - transactional(em -> { - Person p1 = new Person("P1"); - Person p2 = new Person("P2"); - Person p3 = new Person("P3"); - em.persist(p1); - em.persist(p2); - em.persist(p3); - - Cat c1 = new Cat("C1", 1, p2); - Cat c2 = new Cat("C2", 2, p2); - Cat c3 = new Cat("C3", 4, p2); - - Cat c4 = new Cat("C4", 6, p3); - - Cat c5 = new Cat("C5", 8, null); - Cat c6 = new Cat("C6", 7, null); - - em.persist(c1); - em.persist(c2); - em.persist(c3); - em.persist(c4); - em.persist(c5); - em.persist(c6); - - c1.setMother(c3); - c3.getKittens().add(c1); - - c1.setFather(c5); - c5.getKittens().add(c1); - - c2.setMother(c3); - c3.getKittens().add(c2); - - c2.setFather(c6); - c6.getKittens().add(c2); - - c4.setFather(c6); - c6.getKittens().add(c4); - }); - } - - protected abstract Class[] getEntityViewClasses(); - - protected void transactional(Consumer consumer) { - EntityManager em = emf.createEntityManager(); - EntityTransaction tx = em.getTransaction(); - boolean success = false; - - try { - tx.begin(); - consumer.accept(em); - success = true; - } finally { - try { - if (success) { - tx.commit(); - } else { - tx.rollback(); - } - } finally { - em.close(); - } - } - } - - @After - public void destruct() { - emf.close(); - } -} diff --git a/archetype/entity-view-sample-jakarta/src/main/resources/archetype-resources/src/test/java/sample/SampleTest.java b/archetype/entity-view-sample-jakarta/src/main/resources/archetype-resources/src/test/java/sample/SampleTest.java deleted file mode 100644 index 994fa01d73..0000000000 --- a/archetype/entity-view-sample-jakarta/src/main/resources/archetype-resources/src/test/java/sample/SampleTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Blazebit - */ - -package ${package}.sample; - -import com.blazebit.persistence.CriteriaBuilder; -import com.blazebit.persistence.view.EntityViewSetting; -import java.util.List; -import ${package}.model.Cat; -import ${package}.model.Person; -import ${package}.view.CatSimpleView; -import ${package}.view.CatWithOwnerView; -import ${package}.view.PersonSimpleView; -import org.junit.Assert; -import org.junit.Test; - -public class SampleTest extends AbstractSampleTest { - - @Override - protected Class[] getEntityViewClasses() { - return new Class[] { - CatSimpleView.class, - CatWithOwnerView.class, - PersonSimpleView.class - }; - } - - @Test - public void sampleTest() { - transactional(em -> { - CriteriaBuilder catCriteriaBuilder = cbf.create(em, Cat.class); - catCriteriaBuilder.from(Cat.class, "cat"); - - EntityViewSetting> setting = EntityViewSetting.create(CatWithOwnerView.class); - CriteriaBuilder cb = evm.applySetting(setting, catCriteriaBuilder); - List list = cb.getResultList(); - - System.out.println(list); - Assert.assertEquals(6, list.size()); - }); - } -} diff --git a/archetype/entity-view-sample/pom.xml b/archetype/entity-view-sample/pom.xml index 50381c79cc..53000bbb1c 100644 --- a/archetype/entity-view-sample/pom.xml +++ b/archetype/entity-view-sample/pom.xml @@ -10,7 +10,7 @@ com.blazebit blaze-persistence-archetype - 1.6.15-SNAPSHOT + 2.0.0-SNAPSHOT ../pom.xml diff --git a/archetype/entity-view-sample/src/main/resources/archetype-resources/pom.xml b/archetype/entity-view-sample/src/main/resources/archetype-resources/pom.xml index 5c80032bb1..d44eead975 100644 --- a/archetype/entity-view-sample/src/main/resources/archetype-resources/pom.xml +++ b/archetype/entity-view-sample/src/main/resources/archetype-resources/pom.xml @@ -16,8 +16,8 @@ UTF-8 - 1.8 - 1.8 + 11 + 11 ${project.version} @@ -36,9 +36,9 @@ - org.hibernate - hibernate-entitymanager - 5.2.8.Final + org.hibernate.orm + hibernate-core + ${version.hibernate-6.6} @@ -52,7 +52,7 @@ com.blazebit - blaze-persistence-integration-hibernate-5.2 + blaze-persistence-integration-hibernate-6.2 @@ -69,80 +69,83 @@ blaze-persistence-entity-view-processor - + + jakarta.persistence + jakarta.persistence-api + ${version.jpa-api} + provided + + + jakarta.transaction + jakarta.transaction-api + ${version.jta-api} + provided + + + jakarta.validation + jakarta.validation-api + ${version.validation-api} + provided + jakarta.xml.bind jakarta.xml.bind-api - 2.3.3 + ${version.jaxb-api} provided com.sun.xml.bind jaxb-impl - 2.3.3 + ${version.jaxb} provided - jakarta.transaction - jakarta.transaction-api - 1.3.3 + jakarta.annotation + jakarta.annotation-api + ${version.annotation-api} provided jakarta.activation jakarta.activation-api - 1.2.2 + ${version.activation-api} provided - - jakarta.annotation - jakarta.annotation-api - 1.3.5 - provided - - + - junit - junit - 4.11 + org.junit.jupiter + junit-jupiter + ${version.junit-jupiter} test com.h2database h2 - 1.4.200 + ${h2.version} test - - - jdk11+ - - [11,) - - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.8.0 - - --enable-preview - - - - org.apache.maven.plugins - maven-surefire-plugin - 3.0.0-M3 - - false - --enable-preview - - - - - - + + + + org.apache.maven.plugins + maven-compiler-plugin + ${version.compiler.plugin} + + --enable-preview + + + + org.apache.maven.plugins + maven-surefire-plugin + ${version.surefire.plugin} + + false + --enable-preview + + + + diff --git a/archetype/entity-view-sample/src/main/resources/archetype-resources/src/main/java/model/Cat.java b/archetype/entity-view-sample/src/main/resources/archetype-resources/src/main/java/model/Cat.java index abdb90ab73..427a8c3df9 100644 --- a/archetype/entity-view-sample/src/main/resources/archetype-resources/src/main/java/model/Cat.java +++ b/archetype/entity-view-sample/src/main/resources/archetype-resources/src/main/java/model/Cat.java @@ -7,12 +7,12 @@ import java.util.HashSet; import java.util.Set; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.GeneratedValue; -import javax.persistence.Id; -import javax.persistence.ManyToMany; -import javax.persistence.ManyToOne; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.Id; +import jakarta.persistence.ManyToMany; +import jakarta.persistence.ManyToOne; @Entity public class Cat { diff --git a/archetype/entity-view-sample/src/main/resources/archetype-resources/src/main/java/model/Person.java b/archetype/entity-view-sample/src/main/resources/archetype-resources/src/main/java/model/Person.java index 6e55200ef6..add2b18d41 100644 --- a/archetype/entity-view-sample/src/main/resources/archetype-resources/src/main/java/model/Person.java +++ b/archetype/entity-view-sample/src/main/resources/archetype-resources/src/main/java/model/Person.java @@ -7,10 +7,10 @@ import java.util.HashSet; import java.util.Set; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.Id; -import javax.persistence.OneToMany; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.Id; +import jakarta.persistence.OneToMany; @Entity public class Person { diff --git a/archetype/entity-view-sample/src/main/resources/archetype-resources/src/main/resources/META-INF/persistence.xml b/archetype/entity-view-sample/src/main/resources/archetype-resources/src/main/resources/META-INF/persistence.xml index 3a07cacc0b..687a9b9fb0 100644 --- a/archetype/entity-view-sample/src/main/resources/archetype-resources/src/main/resources/META-INF/persistence.xml +++ b/archetype/entity-view-sample/src/main/resources/archetype-resources/src/main/resources/META-INF/persistence.xml @@ -3,17 +3,17 @@ SPDX-License-Identifier: Apache-2.0 Copyright Blazebit --> - + false - - - - - + + + + + diff --git a/archetype/entity-view-sample/src/main/resources/archetype-resources/src/test/java/sample/AbstractSampleTest.java b/archetype/entity-view-sample/src/main/resources/archetype-resources/src/test/java/sample/AbstractSampleTest.java index f512923e97..4fbb6acaa0 100644 --- a/archetype/entity-view-sample/src/main/resources/archetype-resources/src/test/java/sample/AbstractSampleTest.java +++ b/archetype/entity-view-sample/src/main/resources/archetype-resources/src/test/java/sample/AbstractSampleTest.java @@ -12,17 +12,17 @@ import com.blazebit.persistence.view.EntityViewManager; import com.blazebit.persistence.view.spi.EntityViewConfiguration; import java.util.function.Consumer; -import javax.persistence.EntityManager; -import javax.persistence.EntityManagerFactory; -import javax.persistence.EntityTransaction; -import javax.persistence.Persistence; +import jakarta.persistence.EntityManager; +import jakarta.persistence.EntityManagerFactory; +import jakarta.persistence.EntityTransaction; +import jakarta.persistence.Persistence; import ${package}.model.Cat; import ${package}.model.Person; import ${package}.view.CatSimpleView; import ${package}.view.CatWithOwnerView; import ${package}.view.PersonSimpleView; -import org.junit.After; -import org.junit.Before; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; public abstract class AbstractSampleTest { @@ -30,7 +30,7 @@ public abstract class AbstractSampleTest { protected CriteriaBuilderFactory cbf; protected EntityViewManager evm; - @Before + @BeforeEach public void init() { emf = Persistence.createEntityManagerFactory("default"); CriteriaBuilderConfiguration config = Criteria.getDefault(); @@ -109,7 +109,7 @@ protected void transactional(Consumer consumer) { } } - @After + @AfterEach public void destruct() { emf.close(); } diff --git a/archetype/entity-view-sample/src/main/resources/archetype-resources/src/test/java/sample/SampleTest.java b/archetype/entity-view-sample/src/main/resources/archetype-resources/src/test/java/sample/SampleTest.java index 994fa01d73..338620a96e 100644 --- a/archetype/entity-view-sample/src/main/resources/archetype-resources/src/test/java/sample/SampleTest.java +++ b/archetype/entity-view-sample/src/main/resources/archetype-resources/src/test/java/sample/SampleTest.java @@ -13,8 +13,8 @@ import ${package}.view.CatSimpleView; import ${package}.view.CatWithOwnerView; import ${package}.view.PersonSimpleView; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.*; public class SampleTest extends AbstractSampleTest { @@ -38,7 +38,7 @@ public void sampleTest() { List list = cb.getResultList(); System.out.println(list); - Assert.assertEquals(6, list.size()); + assertEquals(6, list.size()); }); } } diff --git a/archetype/java-ee-sample/pom.xml b/archetype/jakarta-ee-sample/pom.xml similarity index 93% rename from archetype/java-ee-sample/pom.xml rename to archetype/jakarta-ee-sample/pom.xml index 06858912a5..af55d9408e 100644 --- a/archetype/java-ee-sample/pom.xml +++ b/archetype/jakarta-ee-sample/pom.xml @@ -7,12 +7,12 @@ blaze-persistence-archetype com.blazebit - 1.6.15-SNAPSHOT + 2.0.0-SNAPSHOT ../pom.xml 4.0.0 - blaze-persistence-archetype-java-ee-sample + blaze-persistence-archetype-jakarta-ee-sample Blazebit Persistence Archetype Java EE Sample diff --git a/archetype/java-ee-sample/src/main/resources/META-INF/maven/archetype.xml b/archetype/jakarta-ee-sample/src/main/resources/META-INF/maven/archetype.xml similarity index 94% rename from archetype/java-ee-sample/src/main/resources/META-INF/maven/archetype.xml rename to archetype/jakarta-ee-sample/src/main/resources/META-INF/maven/archetype.xml index 1585c4b5f4..41b1ac3afa 100644 --- a/archetype/java-ee-sample/src/main/resources/META-INF/maven/archetype.xml +++ b/archetype/jakarta-ee-sample/src/main/resources/META-INF/maven/archetype.xml @@ -24,7 +24,7 @@ src/main/resources/META-INF/persistence.xml src/main/resources/META-INF/beans.xml src/test/resources/META-INF/beans.xml - src/test/resources/META-INF/services/javax.enterprise.inject.spi.Extension + src/test/resources/META-INF/services/jakarta.enterprise.inject.spi.Extension src/test/java/sample/AbstractSampleTest.java diff --git a/archetype/java-ee-sample/src/main/resources/archetype-resources/pom.xml b/archetype/jakarta-ee-sample/src/main/resources/archetype-resources/pom.xml similarity index 69% rename from archetype/java-ee-sample/src/main/resources/archetype-resources/pom.xml rename to archetype/jakarta-ee-sample/src/main/resources/archetype-resources/pom.xml index 1abd67bc5b..9f335086b4 100644 --- a/archetype/java-ee-sample/src/main/resources/archetype-resources/pom.xml +++ b/archetype/jakarta-ee-sample/src/main/resources/archetype-resources/pom.xml @@ -15,12 +15,12 @@ UTF-8 - 1.8 - 1.8 + 11 + 11 ${project.version} - 1.9.3 - 2.4.5.Final + ${version.deltaspike-2.0} + ${version.weld} @@ -51,34 +51,24 @@ org.apache.maven.plugins maven-compiler-plugin - 3.8.0 + ${version.compiler.plugin} - - + --enable-preview org.apache.maven.plugins maven-surefire-plugin - 3.0.0-M3 + ${version.surefire.plugin} false - - + --enable-preview - - org.jboss.spec - jboss-javaee-7.0 - 1.1.0.Final - pom - provided - - com.blazebit @@ -109,35 +99,83 @@ blaze-persistence-integration-entity-view-cdi - + + + jakarta.persistence + jakarta.persistence-api + ${version.jakarta-jpa-3.1-api} + provided + + + jakarta.transaction + jakarta.transaction-api + ${version.jta-api} + provided + + + jakarta.interceptor + jakarta.interceptor-api + ${version.jakarta-interceptor} + provided + + + jakarta.inject + jakarta.inject-api + ${version.jakarta-atinject-api} + provided + + + jakarta.enterprise + jakarta.enterprise.cdi-api + ${version.jakarta-cdi-api} + provided + + + jakarta.el + jakarta.el-api + ${version.jakarta-el-api} + provided + + + jakarta.ws.rs + jakarta.ws.rs-api + ${version.jaxrs-api} + provided + + + jakarta.validation + jakarta.validation-api + ${version.jakarta-validation} + provided + jakarta.xml.bind jakarta.xml.bind-api - 2.3.3 + ${version.jakarta-jaxb-api} provided com.sun.xml.bind jaxb-impl - 2.3.3 + ${version.jakarta-jaxb} provided - jakarta.transaction - jakarta.transaction-api - 1.3.3 + jakarta.annotation + jakarta.annotation-api + ${version.jakarta-annotation} provided jakarta.activation jakarta.activation-api - 1.2.2 + ${version.jakarta-activation} provided - jakarta.annotation - jakarta.annotation-api - 1.3.5 + jakarta.ejb + jakarta.ejb-api + ${version.jakarta-ejb} provided @@ -155,7 +193,7 @@ org.apache.deltaspike.core deltaspike-core-impl - test + runtime org.apache.deltaspike.cdictrl @@ -177,30 +215,17 @@ weld-se-core \${version.weld} test - - - org.jboss - jandex - - - - - - org.jboss - jandex - 2.0.4.Final - test - junit - junit - 4.11 + org.junit.jupiter + junit-jupiter + ${version.junit-jupiter} test com.h2database h2 - 1.4.200 + ${h2.version} test @@ -213,12 +238,12 @@ com.blazebit - blaze-persistence-integration-hibernate-5 + blaze-persistence-integration-hibernate-6.2 - org.hibernate - hibernate-entitymanager - 5.0.12.Final + org.hibernate.orm + hibernate-core + ${version.hibernate-6.6} test @@ -230,16 +255,10 @@ com.blazebit blaze-persistence-integration-eclipselink - - org.eclipse.persistence - javax.persistence - 2.1.1 - test - org.eclipse.persistence eclipselink - 2.6.4 + ${version.eclipselink} test diff --git a/archetype/java-ee-sample/src/main/resources/archetype-resources/src/main/java/Application.java b/archetype/jakarta-ee-sample/src/main/resources/archetype-resources/src/main/java/Application.java similarity index 52% rename from archetype/java-ee-sample/src/main/resources/archetype-resources/src/main/java/Application.java rename to archetype/jakarta-ee-sample/src/main/resources/archetype-resources/src/main/java/Application.java index 3ed0d9f2fb..3db90a1539 100644 --- a/archetype/java-ee-sample/src/main/resources/archetype-resources/src/main/java/Application.java +++ b/archetype/jakarta-ee-sample/src/main/resources/archetype-resources/src/main/java/Application.java @@ -5,9 +5,9 @@ package ${package}; -import javax.ws.rs.ApplicationPath; +import jakarta.ws.rs.ApplicationPath; @ApplicationPath("/") -public class Application extends javax.ws.rs.core.Application { +public class Application extends jakarta.ws.rs.core.Application { } \ No newline at end of file diff --git a/archetype/java-ee-sample/src/main/resources/archetype-resources/src/main/java/config/CriteriaBuilderFactoryProducer.java b/archetype/jakarta-ee-sample/src/main/resources/archetype-resources/src/main/java/config/CriteriaBuilderFactoryProducer.java similarity index 77% rename from archetype/java-ee-sample/src/main/resources/archetype-resources/src/main/java/config/CriteriaBuilderFactoryProducer.java rename to archetype/jakarta-ee-sample/src/main/resources/archetype-resources/src/main/java/config/CriteriaBuilderFactoryProducer.java index 3044b13d5f..9d5b927d4a 100644 --- a/archetype/java-ee-sample/src/main/resources/archetype-resources/src/main/java/config/CriteriaBuilderFactoryProducer.java +++ b/archetype/jakarta-ee-sample/src/main/resources/archetype-resources/src/main/java/config/CriteriaBuilderFactoryProducer.java @@ -9,14 +9,14 @@ import com.blazebit.persistence.CriteriaBuilderFactory; import com.blazebit.persistence.spi.CriteriaBuilderConfiguration; -import javax.enterprise.context.ApplicationScoped; -import javax.enterprise.inject.Produces; -import javax.inject.Inject; -import javax.annotation.PostConstruct; -import javax.persistence.EntityManagerFactory; - -@javax.ejb.Singleton -@javax.ejb.Startup +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.enterprise.inject.Produces; +import jakarta.inject.Inject; +import jakarta.annotation.PostConstruct; +import jakarta.persistence.EntityManagerFactory; + +@jakarta.ejb.Singleton +@jakarta.ejb.Startup public class CriteriaBuilderFactoryProducer { // inject your entity manager factory diff --git a/archetype/java-ee-sample/src/main/resources/archetype-resources/src/main/java/config/EntityManagerProducer.java b/archetype/jakarta-ee-sample/src/main/resources/archetype-resources/src/main/java/config/EntityManagerProducer.java similarity index 57% rename from archetype/java-ee-sample/src/main/resources/archetype-resources/src/main/java/config/EntityManagerProducer.java rename to archetype/jakarta-ee-sample/src/main/resources/archetype-resources/src/main/java/config/EntityManagerProducer.java index 6afb05f4d9..3ffcd36275 100644 --- a/archetype/java-ee-sample/src/main/resources/archetype-resources/src/main/java/config/EntityManagerProducer.java +++ b/archetype/jakarta-ee-sample/src/main/resources/archetype-resources/src/main/java/config/EntityManagerProducer.java @@ -5,14 +5,14 @@ package ${package}.config; -import javax.enterprise.inject.Produces; -import javax.persistence.EntityManager; -import javax.persistence.EntityManagerFactory; -import javax.persistence.PersistenceContext; -import javax.persistence.PersistenceUnit; +import jakarta.enterprise.inject.Produces; +import jakarta.persistence.EntityManager; +import jakarta.persistence.EntityManagerFactory; +import jakarta.persistence.PersistenceContext; +import jakarta.persistence.PersistenceUnit; -@javax.ejb.Singleton -@javax.ejb.Startup +@jakarta.ejb.Singleton +@jakarta.ejb.Startup public class EntityManagerProducer { // inject your entity manager factory diff --git a/archetype/java-ee-sample/src/main/resources/archetype-resources/src/main/java/config/EntityViewManagerProducer.java b/archetype/jakarta-ee-sample/src/main/resources/archetype-resources/src/main/java/config/EntityViewManagerProducer.java similarity index 81% rename from archetype/java-ee-sample/src/main/resources/archetype-resources/src/main/java/config/EntityViewManagerProducer.java rename to archetype/jakarta-ee-sample/src/main/resources/archetype-resources/src/main/java/config/EntityViewManagerProducer.java index 628f192bd2..5473cfc014 100644 --- a/archetype/java-ee-sample/src/main/resources/archetype-resources/src/main/java/config/EntityViewManagerProducer.java +++ b/archetype/jakarta-ee-sample/src/main/resources/archetype-resources/src/main/java/config/EntityViewManagerProducer.java @@ -9,13 +9,13 @@ import com.blazebit.persistence.view.EntityViewManager; import com.blazebit.persistence.view.spi.EntityViewConfiguration; -import javax.enterprise.context.ApplicationScoped; -import javax.enterprise.inject.Produces; -import javax.inject.Inject; -import javax.annotation.PostConstruct; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.enterprise.inject.Produces; +import jakarta.inject.Inject; +import jakarta.annotation.PostConstruct; -@javax.ejb.Singleton -@javax.ejb.Startup +@jakarta.ejb.Singleton +@jakarta.ejb.Startup public class EntityViewManagerProducer { // inject the configuration provided by the cdi integration diff --git a/archetype/java-ee-sample/src/main/resources/archetype-resources/src/main/java/controller/SampleController.java b/archetype/jakarta-ee-sample/src/main/resources/archetype-resources/src/main/java/controller/SampleController.java similarity index 76% rename from archetype/java-ee-sample/src/main/resources/archetype-resources/src/main/java/controller/SampleController.java rename to archetype/jakarta-ee-sample/src/main/resources/archetype-resources/src/main/java/controller/SampleController.java index eaabde7d84..40622cf00b 100644 --- a/archetype/java-ee-sample/src/main/resources/archetype-resources/src/main/java/controller/SampleController.java +++ b/archetype/jakarta-ee-sample/src/main/resources/archetype-resources/src/main/java/controller/SampleController.java @@ -6,10 +6,10 @@ package ${package}.controller; import ${package}.repository.CatSimpleViewRepository; -import javax.inject.Inject; -import javax.ws.rs.GET; -import javax.ws.rs.Produces; -import javax.ws.rs.Path; +import jakarta.inject.Inject; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.Path; @Path("/") public class SampleController { diff --git a/archetype/core-sample-jakarta/src/main/resources/archetype-resources/src/main/java/model/Cat.java b/archetype/jakarta-ee-sample/src/main/resources/archetype-resources/src/main/java/model/Cat.java similarity index 100% rename from archetype/core-sample-jakarta/src/main/resources/archetype-resources/src/main/java/model/Cat.java rename to archetype/jakarta-ee-sample/src/main/resources/archetype-resources/src/main/java/model/Cat.java diff --git a/archetype/core-sample-jakarta/src/main/resources/archetype-resources/src/main/java/model/Person.java b/archetype/jakarta-ee-sample/src/main/resources/archetype-resources/src/main/java/model/Person.java similarity index 100% rename from archetype/core-sample-jakarta/src/main/resources/archetype-resources/src/main/java/model/Person.java rename to archetype/jakarta-ee-sample/src/main/resources/archetype-resources/src/main/java/model/Person.java diff --git a/archetype/java-ee-sample/src/main/resources/archetype-resources/src/main/java/repository/CatSimpleViewRepository.java b/archetype/jakarta-ee-sample/src/main/resources/archetype-resources/src/main/java/repository/CatSimpleViewRepository.java similarity index 77% rename from archetype/java-ee-sample/src/main/resources/archetype-resources/src/main/java/repository/CatSimpleViewRepository.java rename to archetype/jakarta-ee-sample/src/main/resources/archetype-resources/src/main/java/repository/CatSimpleViewRepository.java index 697543c7b7..16c59200ff 100644 --- a/archetype/java-ee-sample/src/main/resources/archetype-resources/src/main/java/repository/CatSimpleViewRepository.java +++ b/archetype/jakarta-ee-sample/src/main/resources/archetype-resources/src/main/java/repository/CatSimpleViewRepository.java @@ -10,14 +10,14 @@ import java.util.List; -import javax.ejb.Stateless; -import javax.ejb.TransactionAttribute; -import javax.ejb.TransactionAttributeType; +import jakarta.ejb.Stateless; +import jakarta.ejb.TransactionAttribute; +import jakarta.ejb.TransactionAttributeType; -import javax.inject.Inject; +import jakarta.inject.Inject; -import javax.persistence.PersistenceContext; -import javax.persistence.EntityManager; +import jakarta.persistence.PersistenceContext; +import jakarta.persistence.EntityManager; import ${package}.model.*; import ${package}.view.*; diff --git a/archetype/entity-view-sample-jakarta/src/main/resources/archetype-resources/src/main/java/view/CatSimpleView.java b/archetype/jakarta-ee-sample/src/main/resources/archetype-resources/src/main/java/view/CatSimpleView.java similarity index 100% rename from archetype/entity-view-sample-jakarta/src/main/resources/archetype-resources/src/main/java/view/CatSimpleView.java rename to archetype/jakarta-ee-sample/src/main/resources/archetype-resources/src/main/java/view/CatSimpleView.java diff --git a/archetype/entity-view-sample-jakarta/src/main/resources/archetype-resources/src/main/java/view/CatWithOwnerView.java b/archetype/jakarta-ee-sample/src/main/resources/archetype-resources/src/main/java/view/CatWithOwnerView.java similarity index 100% rename from archetype/entity-view-sample-jakarta/src/main/resources/archetype-resources/src/main/java/view/CatWithOwnerView.java rename to archetype/jakarta-ee-sample/src/main/resources/archetype-resources/src/main/java/view/CatWithOwnerView.java diff --git a/archetype/entity-view-sample-jakarta/src/main/resources/archetype-resources/src/main/java/view/PersonSimpleView.java b/archetype/jakarta-ee-sample/src/main/resources/archetype-resources/src/main/java/view/PersonSimpleView.java similarity index 100% rename from archetype/entity-view-sample-jakarta/src/main/resources/archetype-resources/src/main/java/view/PersonSimpleView.java rename to archetype/jakarta-ee-sample/src/main/resources/archetype-resources/src/main/java/view/PersonSimpleView.java diff --git a/archetype/jakarta-ee-sample/src/main/resources/archetype-resources/src/main/resources/META-INF/beans.xml b/archetype/jakarta-ee-sample/src/main/resources/archetype-resources/src/main/resources/META-INF/beans.xml new file mode 100644 index 0000000000..dc988397a1 --- /dev/null +++ b/archetype/jakarta-ee-sample/src/main/resources/archetype-resources/src/main/resources/META-INF/beans.xml @@ -0,0 +1,11 @@ + + + + \ No newline at end of file diff --git a/archetype/entity-view-sample-jakarta/src/main/resources/archetype-resources/src/main/resources/META-INF/persistence.xml b/archetype/jakarta-ee-sample/src/main/resources/archetype-resources/src/main/resources/META-INF/persistence.xml similarity index 67% rename from archetype/entity-view-sample-jakarta/src/main/resources/archetype-resources/src/main/resources/META-INF/persistence.xml rename to archetype/jakarta-ee-sample/src/main/resources/archetype-resources/src/main/resources/META-INF/persistence.xml index 687a9b9fb0..4c9bb3dcd3 100644 --- a/archetype/entity-view-sample-jakarta/src/main/resources/archetype-resources/src/main/resources/META-INF/persistence.xml +++ b/archetype/jakarta-ee-sample/src/main/resources/archetype-resources/src/main/resources/META-INF/persistence.xml @@ -3,11 +3,11 @@ SPDX-License-Identifier: Apache-2.0 Copyright Blazebit --> - - + + false - + diff --git a/archetype/java-ee-sample/src/main/resources/archetype-resources/src/test/java/sample/AbstractSampleTest.java b/archetype/jakarta-ee-sample/src/main/resources/archetype-resources/src/test/java/sample/AbstractSampleTest.java similarity index 88% rename from archetype/java-ee-sample/src/main/resources/archetype-resources/src/test/java/sample/AbstractSampleTest.java rename to archetype/jakarta-ee-sample/src/main/resources/archetype-resources/src/test/java/sample/AbstractSampleTest.java index 59342c1367..6383baa8f5 100644 --- a/archetype/java-ee-sample/src/main/resources/archetype-resources/src/test/java/sample/AbstractSampleTest.java +++ b/archetype/jakarta-ee-sample/src/main/resources/archetype-resources/src/test/java/sample/AbstractSampleTest.java @@ -14,20 +14,20 @@ import org.apache.deltaspike.cdise.api.CdiContainerLoader; import org.apache.deltaspike.core.api.provider.BeanProvider; import java.util.function.Consumer; -import javax.persistence.EntityManager; -import javax.persistence.EntityManagerFactory; -import javax.persistence.EntityTransaction; -import javax.persistence.Persistence; +import jakarta.persistence.EntityManager; +import jakarta.persistence.EntityManagerFactory; +import jakarta.persistence.EntityTransaction; +import jakarta.persistence.Persistence; import ${package}.model.Cat; import ${package}.model.Person; import ${package}.view.CatSimpleView; import ${package}.view.CatWithOwnerView; import ${package}.view.PersonSimpleView; -import javax.inject.Inject; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.BeforeClass; +import jakarta.inject.Inject; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.BeforeEach; public abstract class AbstractSampleTest { @@ -40,13 +40,13 @@ public abstract class AbstractSampleTest { @Inject protected EntityViewManager evm; - @BeforeClass + @BeforeAll public static void bootContainer() { CdiContainer container = CdiContainerLoader.getCdiContainer(); container.boot(); } - @AfterClass + @AfterAll public static void shutdownContainer() { CdiContainer container = CdiContainerLoader.getCdiContainer(); container.shutdown(); @@ -58,13 +58,13 @@ public void startContexts() { BeanProvider.injectFields(this); } - @After + @AfterEach public void stopContexts() { CdiContainer container = CdiContainerLoader.getCdiContainer(); container.getContextControl().stopContexts(); } - @Before + @BeforeEach public void init() { startContexts(); transactional(em -> { diff --git a/archetype/java-ee-sample/src/main/resources/archetype-resources/src/test/java/sample/EntityManagerFactoryHolder.java b/archetype/jakarta-ee-sample/src/main/resources/archetype-resources/src/test/java/sample/EntityManagerFactoryHolder.java similarity index 70% rename from archetype/java-ee-sample/src/main/resources/archetype-resources/src/test/java/sample/EntityManagerFactoryHolder.java rename to archetype/jakarta-ee-sample/src/main/resources/archetype-resources/src/test/java/sample/EntityManagerFactoryHolder.java index a779475ef1..f5acf6407e 100644 --- a/archetype/java-ee-sample/src/main/resources/archetype-resources/src/test/java/sample/EntityManagerFactoryHolder.java +++ b/archetype/jakarta-ee-sample/src/main/resources/archetype-resources/src/test/java/sample/EntityManagerFactoryHolder.java @@ -5,15 +5,15 @@ package ${package}.sample; -import javax.annotation.PostConstruct; -import javax.annotation.PreDestroy; -import javax.enterprise.context.ApplicationScoped; -import javax.enterprise.context.RequestScoped; -import javax.enterprise.inject.Produces; -import javax.enterprise.inject.Disposes; -import javax.persistence.EntityManager; -import javax.persistence.EntityManagerFactory; -import javax.persistence.Persistence; +import jakarta.annotation.PostConstruct; +import jakarta.annotation.PreDestroy; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.enterprise.context.RequestScoped; +import jakarta.enterprise.inject.Produces; +import jakarta.enterprise.inject.Disposes; +import jakarta.persistence.EntityManager; +import jakarta.persistence.EntityManagerFactory; +import jakarta.persistence.Persistence; /** * Workaround for WELD-2245 which prevents the use of @ApplicationScoped for EntityManagerFactory directly diff --git a/archetype/java-ee-sample/src/main/resources/archetype-resources/src/test/java/sample/SampleTest.java b/archetype/jakarta-ee-sample/src/main/resources/archetype-resources/src/test/java/sample/SampleTest.java similarity index 89% rename from archetype/java-ee-sample/src/main/resources/archetype-resources/src/test/java/sample/SampleTest.java rename to archetype/jakarta-ee-sample/src/main/resources/archetype-resources/src/test/java/sample/SampleTest.java index a8145bf92f..7dfe92087c 100644 --- a/archetype/java-ee-sample/src/main/resources/archetype-resources/src/test/java/sample/SampleTest.java +++ b/archetype/jakarta-ee-sample/src/main/resources/archetype-resources/src/test/java/sample/SampleTest.java @@ -13,8 +13,8 @@ import ${package}.view.CatSimpleView; import ${package}.view.CatWithOwnerView; import ${package}.view.PersonSimpleView; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.*; public class SampleTest extends AbstractSampleTest { @@ -29,7 +29,7 @@ public void sampleTest() { List list = cb.getResultList(); System.out.println(list); - Assert.assertEquals(6, list.size()); + assertEquals(6, list.size()); }); } } diff --git a/archetype/java-ee-sample/src/main/resources/archetype-resources/src/test/java/sample/TestExtension.java b/archetype/jakarta-ee-sample/src/main/resources/archetype-resources/src/test/java/sample/TestExtension.java similarity index 76% rename from archetype/java-ee-sample/src/main/resources/archetype-resources/src/test/java/sample/TestExtension.java rename to archetype/jakarta-ee-sample/src/main/resources/archetype-resources/src/test/java/sample/TestExtension.java index 3b7da685c8..62d90eae86 100644 --- a/archetype/java-ee-sample/src/main/resources/archetype-resources/src/test/java/sample/TestExtension.java +++ b/archetype/jakarta-ee-sample/src/main/resources/archetype-resources/src/test/java/sample/TestExtension.java @@ -7,9 +7,9 @@ import ${package}.config.EntityManagerProducer; -import javax.enterprise.event.Observes; -import javax.enterprise.inject.spi.Extension; -import javax.enterprise.inject.spi.ProcessAnnotatedType; +import jakarta.enterprise.event.Observes; +import jakarta.enterprise.inject.spi.Extension; +import jakarta.enterprise.inject.spi.ProcessAnnotatedType; /** * In the test, we have to produce the EntityManagerFactory and EntityManager manually diff --git a/archetype/jakarta-ee-sample/src/main/resources/archetype-resources/src/test/resources/META-INF/beans.xml b/archetype/jakarta-ee-sample/src/main/resources/archetype-resources/src/test/resources/META-INF/beans.xml new file mode 100644 index 0000000000..dc988397a1 --- /dev/null +++ b/archetype/jakarta-ee-sample/src/main/resources/archetype-resources/src/test/resources/META-INF/beans.xml @@ -0,0 +1,11 @@ + + + + \ No newline at end of file diff --git a/archetype/java-ee-sample/src/main/resources/archetype-resources/src/test/resources/META-INF/services/javax.enterprise.inject.spi.Extension b/archetype/jakarta-ee-sample/src/main/resources/archetype-resources/src/test/resources/META-INF/services/jakarta.enterprise.inject.spi.Extension similarity index 100% rename from archetype/java-ee-sample/src/main/resources/archetype-resources/src/test/resources/META-INF/services/javax.enterprise.inject.spi.Extension rename to archetype/jakarta-ee-sample/src/main/resources/archetype-resources/src/test/resources/META-INF/services/jakarta.enterprise.inject.spi.Extension diff --git a/archetype/java-ee-sample/src/main/resources/archetype-resources/src/main/java/model/Cat.java b/archetype/java-ee-sample/src/main/resources/archetype-resources/src/main/java/model/Cat.java deleted file mode 100644 index abdb90ab73..0000000000 --- a/archetype/java-ee-sample/src/main/resources/archetype-resources/src/main/java/model/Cat.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Blazebit - */ - -package ${package}.model; - -import java.util.HashSet; -import java.util.Set; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.GeneratedValue; -import javax.persistence.Id; -import javax.persistence.ManyToMany; -import javax.persistence.ManyToOne; - -@Entity -public class Cat { - - @Id - @GeneratedValue - private Long id; - private String name; - private Integer age; - @ManyToOne(fetch = FetchType.LAZY, optional = true) - private Person owner; - @ManyToOne(fetch = FetchType.LAZY, optional = true) - private Cat mother; - @ManyToOne(fetch = FetchType.LAZY, optional = true) - private Cat father; - @ManyToMany - private Set kittens = new HashSet<>(); - - public Cat() { - } - - public Cat(String name, Integer age, Person owner) { - this.name = name; - this.age = age; - this.owner = owner; - } - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public Integer getAge() { - return age; - } - - public void setAge(Integer age) { - this.age = age; - } - - public Person getOwner() { - return owner; - } - - public void setOwner(Person owner) { - this.owner = owner; - } - - public Cat getMother() { - return mother; - } - - public void setMother(Cat mother) { - this.mother = mother; - } - - public Cat getFather() { - return father; - } - - public void setFather(Cat father) { - this.father = father; - } - - public Set getKittens() { - return kittens; - } - - public void setKittens(Set kittens) { - this.kittens = kittens; - } -} diff --git a/archetype/java-ee-sample/src/main/resources/archetype-resources/src/main/java/model/Person.java b/archetype/java-ee-sample/src/main/resources/archetype-resources/src/main/java/model/Person.java deleted file mode 100644 index 6e55200ef6..0000000000 --- a/archetype/java-ee-sample/src/main/resources/archetype-resources/src/main/java/model/Person.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Blazebit - */ - -package ${package}.model; - -import java.util.HashSet; -import java.util.Set; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.Id; -import javax.persistence.OneToMany; - -@Entity -public class Person { - - @Id - @GeneratedValue - private Long id; - private String name; - @OneToMany(mappedBy = "owner") - private Set kittens = new HashSet<>(); - - public Person() { - } - - public Person(String name) { - this.name = name; - } - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public Set getKittens() { - return kittens; - } - - public void setKittens(Set kittens) { - this.kittens = kittens; - } -} diff --git a/archetype/java-ee-sample/src/main/resources/archetype-resources/src/main/java/view/CatSimpleView.java b/archetype/java-ee-sample/src/main/resources/archetype-resources/src/main/java/view/CatSimpleView.java deleted file mode 100644 index 440e856e98..0000000000 --- a/archetype/java-ee-sample/src/main/resources/archetype-resources/src/main/java/view/CatSimpleView.java +++ /dev/null @@ -1,18 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Blazebit - */ - -package ${package}.view; - -import com.blazebit.persistence.view.*; -import ${package}.model.*; - -@EntityView(Cat.class) -public interface CatSimpleView { - - @IdMapping - Long getId(); - - String getName(); -} diff --git a/archetype/java-ee-sample/src/main/resources/archetype-resources/src/main/java/view/CatWithOwnerView.java b/archetype/java-ee-sample/src/main/resources/archetype-resources/src/main/java/view/CatWithOwnerView.java deleted file mode 100644 index e436338b7b..0000000000 --- a/archetype/java-ee-sample/src/main/resources/archetype-resources/src/main/java/view/CatWithOwnerView.java +++ /dev/null @@ -1,16 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Blazebit - */ - -package ${package}.view; - -import com.blazebit.persistence.view.*; -import ${package}.model.*; - -@EntityView(Cat.class) -public interface CatWithOwnerView extends CatSimpleView { - - PersonSimpleView getOwner(); - -} diff --git a/archetype/java-ee-sample/src/main/resources/archetype-resources/src/main/java/view/PersonSimpleView.java b/archetype/java-ee-sample/src/main/resources/archetype-resources/src/main/java/view/PersonSimpleView.java deleted file mode 100644 index 82b6d5cff4..0000000000 --- a/archetype/java-ee-sample/src/main/resources/archetype-resources/src/main/java/view/PersonSimpleView.java +++ /dev/null @@ -1,19 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Blazebit - */ - -package ${package}.view; - -import com.blazebit.persistence.view.*; -import ${package}.model.*; - -@EntityView(Person.class) -public interface PersonSimpleView { - - @IdMapping - Long getId(); - - String getName(); - -} diff --git a/archetype/java-ee-sample/src/main/resources/archetype-resources/src/main/resources/META-INF/beans.xml b/archetype/java-ee-sample/src/main/resources/archetype-resources/src/main/resources/META-INF/beans.xml deleted file mode 100644 index dc74ca17f4..0000000000 --- a/archetype/java-ee-sample/src/main/resources/archetype-resources/src/main/resources/META-INF/beans.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - \ No newline at end of file diff --git a/archetype/java-ee-sample/src/main/resources/archetype-resources/src/main/resources/META-INF/persistence.xml b/archetype/java-ee-sample/src/main/resources/archetype-resources/src/main/resources/META-INF/persistence.xml deleted file mode 100644 index 9ae1c0f769..0000000000 --- a/archetype/java-ee-sample/src/main/resources/archetype-resources/src/main/resources/META-INF/persistence.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - false - - - - - - - - - - diff --git a/archetype/java-ee-sample/src/main/resources/archetype-resources/src/test/resources/META-INF/beans.xml b/archetype/java-ee-sample/src/main/resources/archetype-resources/src/test/resources/META-INF/beans.xml deleted file mode 100644 index dc74ca17f4..0000000000 --- a/archetype/java-ee-sample/src/main/resources/archetype-resources/src/test/resources/META-INF/beans.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - \ No newline at end of file diff --git a/archetype/pom.xml b/archetype/pom.xml index 3b63b7c0df..4dc97ddee8 100644 --- a/archetype/pom.xml +++ b/archetype/pom.xml @@ -8,7 +8,7 @@ com.blazebit blaze-persistence-parent - 1.6.15-SNAPSHOT + 2.0.0-SNAPSHOT ../parent/pom.xml @@ -23,9 +23,6 @@ spring-data-sample spring-boot-sample deltaspike-data-sample - java-ee-sample - - core-sample-jakarta - entity-view-sample-jakarta + jakarta-ee-sample \ No newline at end of file diff --git a/archetype/spring-boot-sample/pom.xml b/archetype/spring-boot-sample/pom.xml index 266eb84c4d..2207f1b7cd 100644 --- a/archetype/spring-boot-sample/pom.xml +++ b/archetype/spring-boot-sample/pom.xml @@ -7,7 +7,7 @@ blaze-persistence-archetype com.blazebit - 1.6.15-SNAPSHOT + 2.0.0-SNAPSHOT ../pom.xml 4.0.0 diff --git a/archetype/spring-boot-sample/src/main/resources/archetype-resources/pom.xml b/archetype/spring-boot-sample/src/main/resources/archetype-resources/pom.xml index 5a48f32085..82431c0569 100644 --- a/archetype/spring-boot-sample/src/main/resources/archetype-resources/pom.xml +++ b/archetype/spring-boot-sample/src/main/resources/archetype-resources/pom.xml @@ -9,7 +9,7 @@ org.springframework.boot spring-boot-starter-parent - 2.4.0 + ${version.spring-data-latest-spring-boot} \${groupId} @@ -21,10 +21,11 @@ UTF-8 - 1.8 - 1.8 + 17 + 17 ${project.version} + ${version.hibernate-6.6} @@ -60,7 +61,7 @@ com.blazebit - blaze-persistence-integration-hibernate-5.4 + blaze-persistence-integration-hibernate-6.2 @@ -80,7 +81,7 @@ com.blazebit - blaze-persistence-integration-entity-view-spring + blaze-persistence-integration-entity-view-spring-6.0 @@ -98,46 +99,64 @@ com.blazebit - blaze-persistence-integration-spring-data-2.4 + blaze-persistence-integration-spring-data-3.3 - + + jakarta.persistence + jakarta.persistence-api + ${version.jpa-api} + provided + + + jakarta.transaction + jakarta.transaction-api + ${version.jta-api} + provided + + + jakarta.validation + jakarta.validation-api + ${version.validation-api} + provided + jakarta.xml.bind jakarta.xml.bind-api - 2.3.3 + ${version.jaxb-api} + provided com.sun.xml.bind jaxb-impl - 2.3.3 + ${version.jaxb} + provided - jakarta.transaction - jakarta.transaction-api - 1.3.3 + jakarta.annotation + jakarta.annotation-api + ${version.annotation-api} + provided jakarta.activation jakarta.activation-api - 1.2.2 - - - jakarta.annotation - jakarta.annotation-api - 1.3.5 + ${version.activation-api} + provided - junit - junit + org.junit.jupiter + junit-jupiter + ${version.junit-jupiter} test com.h2database h2 - 1.4.200 + ${h2.version} + test org.springframework @@ -151,35 +170,23 @@ org.springframework.boot spring-boot-maven-plugin + + org.apache.maven.plugins + maven-compiler-plugin + ${version.compiler.plugin} + + --enable-preview + + + + org.apache.maven.plugins + maven-surefire-plugin + ${version.surefire.plugin} + + false + --enable-preview + + - - - jdk11+ - - [11,) - - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.8.0 - - --enable-preview - - - - org.apache.maven.plugins - maven-surefire-plugin - 3.0.0-M3 - - false - --enable-preview - - - - - - \ No newline at end of file diff --git a/archetype/spring-boot-sample/src/main/resources/archetype-resources/src/main/java/config/BlazePersistenceConfiguration.java b/archetype/spring-boot-sample/src/main/resources/archetype-resources/src/main/java/config/BlazePersistenceConfiguration.java index 0ea6e6a34b..2dc1707ab4 100644 --- a/archetype/spring-boot-sample/src/main/resources/archetype-resources/src/main/java/config/BlazePersistenceConfiguration.java +++ b/archetype/spring-boot-sample/src/main/resources/archetype-resources/src/main/java/config/BlazePersistenceConfiguration.java @@ -18,8 +18,8 @@ import org.springframework.context.annotation.Lazy; import org.springframework.context.annotation.Scope; -import javax.persistence.EntityManagerFactory; -import javax.persistence.PersistenceUnit; +import jakarta.persistence.EntityManagerFactory; +import jakarta.persistence.PersistenceUnit; @Configuration @EnableEntityViews(basePackages = { "${package}.view"}) diff --git a/archetype/spring-boot-sample/src/main/resources/archetype-resources/src/main/java/model/Cat.java b/archetype/spring-boot-sample/src/main/resources/archetype-resources/src/main/java/model/Cat.java index abdb90ab73..427a8c3df9 100644 --- a/archetype/spring-boot-sample/src/main/resources/archetype-resources/src/main/java/model/Cat.java +++ b/archetype/spring-boot-sample/src/main/resources/archetype-resources/src/main/java/model/Cat.java @@ -7,12 +7,12 @@ import java.util.HashSet; import java.util.Set; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.GeneratedValue; -import javax.persistence.Id; -import javax.persistence.ManyToMany; -import javax.persistence.ManyToOne; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.Id; +import jakarta.persistence.ManyToMany; +import jakarta.persistence.ManyToOne; @Entity public class Cat { diff --git a/archetype/spring-boot-sample/src/main/resources/archetype-resources/src/main/java/model/Person.java b/archetype/spring-boot-sample/src/main/resources/archetype-resources/src/main/java/model/Person.java index 6e55200ef6..add2b18d41 100644 --- a/archetype/spring-boot-sample/src/main/resources/archetype-resources/src/main/java/model/Person.java +++ b/archetype/spring-boot-sample/src/main/resources/archetype-resources/src/main/java/model/Person.java @@ -7,10 +7,10 @@ import java.util.HashSet; import java.util.Set; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.Id; -import javax.persistence.OneToMany; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.Id; +import jakarta.persistence.OneToMany; @Entity public class Person { diff --git a/archetype/spring-boot-sample/src/main/resources/archetype-resources/src/test/java/sample/AbstractSampleTest.java b/archetype/spring-boot-sample/src/main/resources/archetype-resources/src/test/java/sample/AbstractSampleTest.java index 030b6dc781..b5bdd57707 100644 --- a/archetype/spring-boot-sample/src/main/resources/archetype-resources/src/test/java/sample/AbstractSampleTest.java +++ b/archetype/spring-boot-sample/src/main/resources/archetype-resources/src/test/java/sample/AbstractSampleTest.java @@ -5,14 +5,14 @@ package ${package}.sample; -import javax.persistence.EntityManager; +import jakarta.persistence.EntityManager; import ${package}.model.Cat; import ${package}.model.Person; import ${package}.view.CatSimpleView; import ${package}.view.CatWithOwnerView; import ${package}.view.PersonSimpleView; -import org.junit.After; -import org.junit.Before; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.transaction.annotation.Transactional; @@ -22,7 +22,7 @@ public abstract class AbstractSampleTest { @Autowired protected EntityManager em; - @Before + @BeforeEach public void init() { Person p1 = new Person("P1"); Person p2 = new Person("P2"); diff --git a/archetype/spring-boot-sample/src/main/resources/archetype-resources/src/test/java/sample/SampleTest.java b/archetype/spring-boot-sample/src/main/resources/archetype-resources/src/test/java/sample/SampleTest.java index 8da11333c2..827e032a9c 100644 --- a/archetype/spring-boot-sample/src/main/resources/archetype-resources/src/test/java/sample/SampleTest.java +++ b/archetype/spring-boot-sample/src/main/resources/archetype-resources/src/test/java/sample/SampleTest.java @@ -12,17 +12,17 @@ import ${package}.model.Person; import ${package}.view.CatSimpleView; import ${package}.repository.CatSimpleViewRepository; -import org.junit.Assert; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.*; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.test.context.*; import org.springframework.context.annotation.*; import org.springframework.beans.factory.annotation.*; import com.blazebit.persistence.integration.view.spring.EnableEntityViews; import com.blazebit.persistence.spring.data.repository.config.EnableBlazeRepositories; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = SampleTest.TestConfig.class) public class SampleTest extends AbstractSampleTest { @@ -34,7 +34,7 @@ public void sampleTest() { final Iterable listIterable = catSimpleViewRepository.findAll(); final List list = new ArrayList<>(); listIterable.forEach(view -> list.add(view)); - Assert.assertEquals(6, list.size()); + assertEquals(6, list.size()); } @Configuration diff --git a/archetype/spring-data-sample/pom.xml b/archetype/spring-data-sample/pom.xml index 62ec5db0f0..d1ed5ad0ee 100644 --- a/archetype/spring-data-sample/pom.xml +++ b/archetype/spring-data-sample/pom.xml @@ -3,7 +3,7 @@ blaze-persistence-archetype com.blazebit - 1.6.15-SNAPSHOT + 2.0.0-SNAPSHOT ../pom.xml 4.0.0 diff --git a/archetype/spring-data-sample/src/main/resources/archetype-resources/pom.xml b/archetype/spring-data-sample/src/main/resources/archetype-resources/pom.xml index 2d16f708a2..3a43bc8cff 100644 --- a/archetype/spring-data-sample/src/main/resources/archetype-resources/pom.xml +++ b/archetype/spring-data-sample/src/main/resources/archetype-resources/pom.xml @@ -16,11 +16,13 @@ UTF-8 - 1.8 - 1.8 + 17 + 17 ${project.version} - ${version.spring-data-2.4-spring} + ${version.hibernate-6.6} + ${version.spring-data-latest-spring} + ${version.spring-data-latest} @@ -44,9 +46,9 @@ - org.hibernate - hibernate-entitymanager - 5.4.6.Final + org.hibernate.orm + hibernate-core + \${version.hibernate} @@ -60,7 +62,7 @@ com.blazebit - blaze-persistence-integration-hibernate-5.4 + blaze-persistence-integration-hibernate-6.2 @@ -80,7 +82,7 @@ com.blazebit - blaze-persistence-integration-entity-view-spring + blaze-persistence-integration-entity-view-spring-6.0 @@ -95,57 +97,68 @@ org.springframework.data spring-data-jpa - ${version.spring-data-2.4} + \${version.spring.data} provided com.blazebit - blaze-persistence-integration-spring-data-2.4 + blaze-persistence-integration-spring-data-3.3 - + + jakarta.persistence + jakarta.persistence-api + ${version.jpa-api} + provided + + + jakarta.transaction + jakarta.transaction-api + ${version.jta-api} + provided + + + jakarta.validation + jakarta.validation-api + ${version.validation-api} + provided + jakarta.xml.bind jakarta.xml.bind-api - 2.3.3 + ${version.jaxb-api} provided com.sun.xml.bind jaxb-impl - 2.3.3 + ${version.jaxb} provided - jakarta.transaction - jakarta.transaction-api - 1.3.3 + jakarta.annotation + jakarta.annotation-api + ${version.annotation-api} provided jakarta.activation jakarta.activation-api - 1.2.2 - provided - - - jakarta.annotation - jakarta.annotation-api - 1.3.5 + ${version.activation-api} provided - junit - junit - 4.12 + org.junit.jupiter + junit-jupiter + ${version.junit-jupiter} test com.h2database h2 - 1.4.200 + ${h2.version} test @@ -154,33 +167,25 @@ test - - - jdk11+ - - [11,) - - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.8.0 - - --enable-preview - - - - org.apache.maven.plugins - maven-surefire-plugin - 3.0.0-M3 - - false - --enable-preview - - - - - - + + + + org.apache.maven.plugins + maven-compiler-plugin + ${version.compiler.plugin} + + --enable-preview + + + + org.apache.maven.plugins + maven-surefire-plugin + ${version.surefire.plugin} + + false + --enable-preview + + + + \ No newline at end of file diff --git a/archetype/spring-data-sample/src/main/resources/archetype-resources/src/main/java/config/BlazePersistenceConfiguration.java b/archetype/spring-data-sample/src/main/resources/archetype-resources/src/main/java/config/BlazePersistenceConfiguration.java index 0ea6e6a34b..2dc1707ab4 100644 --- a/archetype/spring-data-sample/src/main/resources/archetype-resources/src/main/java/config/BlazePersistenceConfiguration.java +++ b/archetype/spring-data-sample/src/main/resources/archetype-resources/src/main/java/config/BlazePersistenceConfiguration.java @@ -18,8 +18,8 @@ import org.springframework.context.annotation.Lazy; import org.springframework.context.annotation.Scope; -import javax.persistence.EntityManagerFactory; -import javax.persistence.PersistenceUnit; +import jakarta.persistence.EntityManagerFactory; +import jakarta.persistence.PersistenceUnit; @Configuration @EnableEntityViews(basePackages = { "${package}.view"}) diff --git a/archetype/spring-data-sample/src/main/resources/archetype-resources/src/main/java/model/Cat.java b/archetype/spring-data-sample/src/main/resources/archetype-resources/src/main/java/model/Cat.java index abdb90ab73..427a8c3df9 100644 --- a/archetype/spring-data-sample/src/main/resources/archetype-resources/src/main/java/model/Cat.java +++ b/archetype/spring-data-sample/src/main/resources/archetype-resources/src/main/java/model/Cat.java @@ -7,12 +7,12 @@ import java.util.HashSet; import java.util.Set; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.GeneratedValue; -import javax.persistence.Id; -import javax.persistence.ManyToMany; -import javax.persistence.ManyToOne; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.Id; +import jakarta.persistence.ManyToMany; +import jakarta.persistence.ManyToOne; @Entity public class Cat { diff --git a/archetype/spring-data-sample/src/main/resources/archetype-resources/src/main/java/model/Person.java b/archetype/spring-data-sample/src/main/resources/archetype-resources/src/main/java/model/Person.java index 6e55200ef6..add2b18d41 100644 --- a/archetype/spring-data-sample/src/main/resources/archetype-resources/src/main/java/model/Person.java +++ b/archetype/spring-data-sample/src/main/resources/archetype-resources/src/main/java/model/Person.java @@ -7,10 +7,10 @@ import java.util.HashSet; import java.util.Set; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.Id; -import javax.persistence.OneToMany; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.Id; +import jakarta.persistence.OneToMany; @Entity public class Person { diff --git a/archetype/spring-data-sample/src/main/resources/archetype-resources/src/main/resources/META-INF/application-config.xml b/archetype/spring-data-sample/src/main/resources/archetype-resources/src/main/resources/META-INF/application-config.xml index b2461c6e12..fff7662ea2 100644 --- a/archetype/spring-data-sample/src/main/resources/archetype-resources/src/main/resources/META-INF/application-config.xml +++ b/archetype/spring-data-sample/src/main/resources/archetype-resources/src/main/resources/META-INF/application-config.xml @@ -12,12 +12,12 @@ http://www.springframework.org/schema/tx http://www.springframework.org/schema/t - + - + diff --git a/archetype/spring-data-sample/src/main/resources/archetype-resources/src/main/resources/META-INF/persistence.xml b/archetype/spring-data-sample/src/main/resources/archetype-resources/src/main/resources/META-INF/persistence.xml index 0ecc6846dc..ad21f65534 100644 --- a/archetype/spring-data-sample/src/main/resources/archetype-resources/src/main/resources/META-INF/persistence.xml +++ b/archetype/spring-data-sample/src/main/resources/archetype-resources/src/main/resources/META-INF/persistence.xml @@ -11,11 +11,11 @@ false - - - - - + + + + + diff --git a/archetype/spring-data-sample/src/main/resources/archetype-resources/src/test/java/sample/AbstractSampleTest.java b/archetype/spring-data-sample/src/main/resources/archetype-resources/src/test/java/sample/AbstractSampleTest.java index 47b5e53ab9..91bccb263f 100644 --- a/archetype/spring-data-sample/src/main/resources/archetype-resources/src/test/java/sample/AbstractSampleTest.java +++ b/archetype/spring-data-sample/src/main/resources/archetype-resources/src/test/java/sample/AbstractSampleTest.java @@ -6,23 +6,23 @@ package ${package}.sample; import java.util.function.Consumer; -import javax.persistence.EntityManager; -import javax.persistence.EntityManagerFactory; -import javax.persistence.EntityTransaction; -import javax.persistence.Persistence; +import jakarta.persistence.EntityManager; +import jakarta.persistence.EntityManagerFactory; +import jakarta.persistence.EntityTransaction; +import jakarta.persistence.Persistence; import ${package}.model.Cat; import ${package}.model.Person; import ${package}.view.CatSimpleView; import ${package}.view.CatWithOwnerView; import ${package}.view.PersonSimpleView; -import org.junit.After; -import org.junit.Before; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; public abstract class AbstractSampleTest { protected EntityManagerFactory emf; - @Before + @BeforeEach public void init() { emf = Persistence.createEntityManagerFactory("default"); @@ -97,7 +97,7 @@ protected void transactional(Consumer consumer) { } } - @After + @AfterEach public void destruct() { emf.close(); } diff --git a/archetype/spring-data-sample/src/main/resources/archetype-resources/src/test/java/sample/SampleTest.java b/archetype/spring-data-sample/src/main/resources/archetype-resources/src/test/java/sample/SampleTest.java index b5d2b175a1..308c98f3b4 100644 --- a/archetype/spring-data-sample/src/main/resources/archetype-resources/src/test/java/sample/SampleTest.java +++ b/archetype/spring-data-sample/src/main/resources/archetype-resources/src/test/java/sample/SampleTest.java @@ -12,17 +12,17 @@ import ${package}.model.Person; import ${package}.view.CatSimpleView; import ${package}.repository.CatSimpleViewRepository; -import org.junit.Assert; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.*; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.test.context.*; import org.springframework.context.annotation.*; import org.springframework.beans.factory.annotation.*; import com.blazebit.persistence.integration.view.spring.EnableEntityViews; import com.blazebit.persistence.spring.data.repository.config.EnableBlazeRepositories; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = SampleTest.TestConfig.class) public class SampleTest extends AbstractSampleTest { @@ -35,7 +35,7 @@ public void sampleTest() { final Iterable listIterable = catSimpleViewRepository.findAll(); final List list = new ArrayList<>(); listIterable.forEach(view -> list.add(view)); - Assert.assertEquals(6, list.size()); + assertEquals(6, list.size()); }); } @@ -43,9 +43,7 @@ public void sampleTest() { @ComponentScan("${package}") @ImportResource("/META-INF/application-config.xml") @EnableEntityViews(basePackages = { "${package}.view"}) - @EnableBlazeRepositories( - basePackages = "${package}.repository", - entityManagerFactoryRef = "myEmf") + @EnableBlazeRepositories(basePackages = "${package}.repository") static class TestConfig { } } diff --git a/build-local.sh b/build-local.sh index c306278dbd..7ce75c3835 100755 --- a/build-local.sh +++ b/build-local.sh @@ -11,20 +11,18 @@ BUILD="$3" PROPERTIES= if [ "$JPA_PROVIDER" == "" ]; then - echo "JPA provider (hibernate-4.2, hibernate-4.3, hibernate-5.0, hibernate-5.1, hibernate-5.2, datanucleus-4, datanucleus-5, eclipselink, openjpa) [hibernate-5.2]: " + echo "JPA provider (hibernate-6.6, hibernate-6.4, hibernate-6.2, eclipselink) [hibernate-6.6]: " read input com.blazebit blaze-persistence - 1.6.15-SNAPSHOT + 2.0.0-SNAPSHOT ../pom.xml @@ -20,7 +20,6 @@ Blazebit Persistence Checkstyle Rules com.blazebit.persistence.checkstyle.rules - 1.8 diff --git a/checkstyle-rules/src/main/resources/blaze-persistence/checkstyle-suppressions.xml b/checkstyle-rules/src/main/resources/blaze-persistence/checkstyle-suppressions.xml index 027e0a0eea..1e89d0e63e 100644 --- a/checkstyle-rules/src/main/resources/blaze-persistence/checkstyle-suppressions.xml +++ b/checkstyle-rules/src/main/resources/blaze-persistence/checkstyle-suppressions.xml @@ -28,6 +28,8 @@ + + @@ -38,7 +40,7 @@ - + diff --git a/ci/build-github-latest.sh b/ci/build-github-latest.sh index f7eb31f458..518c4213bb 100755 --- a/ci/build-github-latest.sh +++ b/ci/build-github-latest.sh @@ -12,18 +12,14 @@ elif [ "$COMPONENT" == 'hibernate-6.4' ]; then export JPAPROVIDER="hibernate-6.4" export SPRING_DATA="spring-data-3.2.x" export PROPERTIES="-s $DIR/latest-settings.xml -Dversion.hibernate-6.4=[6.4,6.5.Alpha)" -elif [ "$COMPONENT" == 'hibernate-6.5' ]; then - export JPAPROVIDER="hibernate-6.5" - export SPRING_DATA="spring-data-3.3.x" - export PROPERTIES="-s $DIR/latest-settings.xml -Dversion.hibernate-6.5=[6.5,6.6.Alpha)" elif [ "$COMPONENT" == 'hibernate-6.6' ]; then export JPAPROVIDER="hibernate-6.6" export SPRING_DATA="spring-data-3.3.x" - export PROPERTIES="-s $DIR/latest-settings.xml -Dversion.hibernate-6.6=[6.6,6.6.Alpha)" + export PROPERTIES="-s $DIR/latest-settings.xml -Dversion.hibernate-6.6=[6.6,7.0.Alpha)" else - export JPAPROVIDER="hibernate-6.2" - export SPRING_DATA="spring-data-3.1.x" - export PROPERTIES="-Dversion.spring-data-3.1=[3,4.Alpha) -Dversion.spring-data-3.1-spring=[6.0,6.1.Alpha) -Dversion.spring-data-3.1-spring-boot=[3,4.Alpha)" + export JPAPROVIDER="hibernate-6.6" + export SPRING_DATA="spring-data-3.3.x" + export PROPERTIES="-Dversion.spring-data-3.3=[3,4.Alpha) -Dversion.spring-data-3.3-spring=[6.0,6.1.Alpha) -Dversion.spring-data-3.3-spring-boot=[3,4.Alpha)" fi exec bash $DIR/../build.sh \ No newline at end of file diff --git a/ci/build-github.sh b/ci/build-github.sh index 950920cb08..36c7c26151 100755 --- a/ci/build-github.sh +++ b/ci/build-github.sh @@ -5,8 +5,6 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" java -version if [ "$RDBMS" == 'mysql' ]; then - bash $DIR/../docker_db.sh mysql_5_7 -elif [ "$RDBMS" == 'mysql8' ]; then bash $DIR/../docker_db.sh mysql elif [ "$RDBMS" == 'postgresql' ]; then bash $DIR/../docker_db.sh postgresql diff --git a/ci/build-travis.sh b/ci/build-travis.sh deleted file mode 100755 index 3728bd4e08..0000000000 --- a/ci/build-travis.sh +++ /dev/null @@ -1,32 +0,0 @@ -#! /bin/bash - -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" - -java -version - -if [ "$NATIVE" = "true" ]; then - sudo add-apt-repository -y ppa:jonathonf/python-3.6 - sudo apt-get update - sudo apt-get install -y python3-pip - yes | sudo pip3 install git+https://github.com/naftulikay/travis-pls - source setup-graalvm.sh -fi - -if [ "$RDBMS" == 'mysql' ]; then - sudo service mysql stop - bash $DIR/../docker_db.sh mysql_5_7 -elif [ "$RDBMS" == 'mysql8' ]; then - sudo service mysql stop - bash $DIR/../docker_db.sh mysql -elif [ "$RDBMS" == 'postgresql' ]; then - sudo service postgres stop - bash $DIR/../docker_db.sh postgresql -elif [ "$RDBMS" == 'db2' ]; then - bash $DIR/../docker_db.sh db2 -elif [ "$RDBMS" == 'oracle' ]; then - bash $DIR/../docker_db.sh oracle -elif [ "$RDBMS" == 'mssql' ]; then - bash $DIR/../docker_db.sh mssql -fi - -exec bash $DIR/../build.sh \ No newline at end of file diff --git a/ci/deploy-snapshot-travis.sh b/ci/deploy-snapshot-travis.sh deleted file mode 100755 index 76a6417ebc..0000000000 --- a/ci/deploy-snapshot-travis.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash -set -e -set -x - -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" - -if [ "$TRAVIS_REPO_SLUG" == "Blazebit/blaze-persistence" ] && - [ "$TRAVIS_BRANCH" == "main" ] && - [ "$TRAVIS_PULL_REQUEST" == "false" ] && - [ "$SNAPSHOT_PUBLISH" == "true" ]; then - - exec bash $DIR/deploy-snapshot.sh -else - echo "Skipping snapshot deployment..." -fi diff --git a/ci/deploy-snapshot.sh b/ci/deploy-snapshot.sh index b74b622e2d..ec2b3a012a 100755 --- a/ci/deploy-snapshot.sh +++ b/ci/deploy-snapshot.sh @@ -6,4 +6,4 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" echo "Starting snapshot deployment..." export MAVEN_OPTS="$MAVEN_OPTS -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn" -exec $DIR/../mvnw -B -P "blazebit-release,spring-data-2.7.x,deltaspike-1.9,hibernate-5.6" -s $DIR/deploy-settings.xml -DperformRelease -DskipTests -DskipITs -Dgpg.skip=true -Dquiet=true -Djdk8.home=$JDK8_HOME clean deploy +exec $DIR/../mvnw -B -P "blazebit-release,spring-data-3.3.x,deltaspike-2.0,hibernate-6.6" -s $DIR/deploy-settings.xml -DperformRelease -DskipTests -DskipITs -Dgpg.skip=true -Dquiet=true clean deploy diff --git a/core/api-jakarta/pom.xml b/core/api-jakarta/pom.xml deleted file mode 100644 index b001f7b5d2..0000000000 --- a/core/api-jakarta/pom.xml +++ /dev/null @@ -1,248 +0,0 @@ - - - - - 4.0.0 - - - com.blazebit - blaze-persistence-core - 1.6.15-SNAPSHOT - ../pom.xml - - - blaze-persistence-core-api-jakarta - jar - - - com.blazebit.persistence.core - - - - - ${project.groupId} - blaze-persistence-core-api - provided - - - jakarta.persistence - jakarta.persistence-api - ${version.jakarta-jpa-api} - provided - - - - - - - maven-antrun-plugin - - - transform-jar - package - - run - - - - - - - - - - - - - - - - - - - - - - transform-sources-jar - package - - run - - - - - - - - - - - - - - - - - - - - - - - - transform-javadoc - package - - run - - - - - - - - - - - - - - - - - - - - - - - - - unpack-sources - package - - - - - - - run - - - - - unpack-classes - package - - - - - - - run - - - - - - org.eclipse.transformer - org.eclipse.transformer.cli - 0.5.0 - - - ant-contrib - ant-contrib - 1.0b3 - - - ant - ant - - - - - biz.aQute.bnd - biz.aQute.bnd.transform - ${version.bnd} - compile - - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - attach-artifacts - package - - attach-artifact - - - - - ${project.build.directory}/${project.build.finalName}-sources.jar - sources - jar - - - - - - intellij-fake-attach-source - package - - add-source - - - - ${project.build.directory}/java/ - - - - - - - - - - blazebit-release - - - - org.codehaus.mojo - build-helper-maven-plugin - - - attach-artifacts - package - - attach-artifact - - - - - ${project.build.directory}/${project.build.finalName}-sources.jar - sources - jar - - - ${project.build.directory}/${project.build.finalName}-javadoc.jar - javadoc - jar - - - - - - - - - - - - diff --git a/core/api-jar/pom.xml b/core/api-jar/pom.xml deleted file mode 100644 index 5c52cf371b..0000000000 --- a/core/api-jar/pom.xml +++ /dev/null @@ -1,117 +0,0 @@ - - - - - 4.0.0 - - - com.blazebit - blaze-persistence-core - 1.6.15-SNAPSHOT - ../pom.xml - - - blaze-persistence-core-api-jar - jar - - - com.blazebit.persistence.core - - - - - ${project.groupId} - blaze-persistence-core-api - - - - - - - org.apache.maven.plugins - maven-shade-plugin - - - package - - shade - - - true - - - ${project.groupId}:blaze-persistence-core-api - - META-INF/versions/** - module-info.class - - - - - - - - - - - - - blazebit-release - - - - maven-dependency-plugin - - - shade-javadoc - - copy - - - - - ${project.groupId} - blaze-persistence-core-api - ${project.version} - jar - javadoc - true - ${project.build.directory} - ${project.artifactId}-${project.version}-javadoc.jar - - - - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - attach-artifacts - package - - attach-artifact - - - - - ${project.build.directory}/${project.artifactId}-${project.version}-javadoc.jar - javadoc - jar - - - - - - - - - - - - diff --git a/core/api/pom.xml b/core/api/pom.xml index 6d67786de3..55b0e20caf 100644 --- a/core/api/pom.xml +++ b/core/api/pom.xml @@ -10,7 +10,7 @@ com.blazebit blaze-persistence-core - 1.6.15-SNAPSHOT + 2.0.0-SNAPSHOT ../pom.xml @@ -24,97 +24,11 @@ - - org.apache.openejb - javaee-api + jakarta.persistence + jakarta.persistence-api provided - - - - org.moditect - moditect-maven-plugin - - - add-module-infos - package - - add-module-info - - - - - module ${module.name} { - requires transitive java.sql; - requires transitive java.persistence; - exports com.blazebit.persistence; - exports com.blazebit.persistence.spi; - exports com.blazebit.persistence.internal; - uses com.blazebit.persistence.spi.CriteriaBuilderConfigurationProvider; - } - - - - - - - - - - - - java9 - - [1.9,) - - - src/main/java9 - - - - - maven-antrun-plugin - - - compile-java9 - compile - - - - - - - - run - - - - - - maven-jar-plugin - true - - - - true - - - - - - default-jar - package - - jar - - - - - - - - diff --git a/core/api/src/main/java/com/blazebit/persistence/BaseSubqueryBuilder.java b/core/api/src/main/java/com/blazebit/persistence/BaseSubqueryBuilder.java index 3c903f9cb5..54cb34bd25 100644 --- a/core/api/src/main/java/com/blazebit/persistence/BaseSubqueryBuilder.java +++ b/core/api/src/main/java/com/blazebit/persistence/BaseSubqueryBuilder.java @@ -5,7 +5,7 @@ package com.blazebit.persistence; -import javax.persistence.Tuple; +import jakarta.persistence.Tuple; /** * A builder for subquery criteria queries. diff --git a/core/api/src/main/java/com/blazebit/persistence/CommonQueryBuilder.java b/core/api/src/main/java/com/blazebit/persistence/CommonQueryBuilder.java index 2cc7a5e0be..5c4c39df81 100644 --- a/core/api/src/main/java/com/blazebit/persistence/CommonQueryBuilder.java +++ b/core/api/src/main/java/com/blazebit/persistence/CommonQueryBuilder.java @@ -9,7 +9,7 @@ import com.blazebit.persistence.spi.JpqlMacro; import com.blazebit.persistence.spi.ServiceProvider; -import javax.persistence.metamodel.Metamodel; +import jakarta.persistence.metamodel.Metamodel; import java.util.Map; /** diff --git a/core/api/src/main/java/com/blazebit/persistence/ConfigurationProperties.java b/core/api/src/main/java/com/blazebit/persistence/ConfigurationProperties.java index 94f75014a6..8a5eee3edc 100644 --- a/core/api/src/main/java/com/blazebit/persistence/ConfigurationProperties.java +++ b/core/api/src/main/java/com/blazebit/persistence/ConfigurationProperties.java @@ -191,7 +191,7 @@ public final class ConfigurationProperties { public static final String CRITERIA_NEGATION_WRAPPER = "com.blazebit.persistence.criteria_negation_wrapper"; /** - * If set to true, values passed to the JPA {@link javax.persistence.criteria.CriteriaBuilder} API are rendered as parameters, + * If set to true, values passed to the JPA {@link jakarta.persistence.criteria.CriteriaBuilder} API are rendered as parameters, * otherwise values are rendered as literals. * Valid values for this property are true and false. * Default is true. diff --git a/core/api/src/main/java/com/blazebit/persistence/CriteriaBuilder.java b/core/api/src/main/java/com/blazebit/persistence/CriteriaBuilder.java index 2b78b36848..133475f5c0 100644 --- a/core/api/src/main/java/com/blazebit/persistence/CriteriaBuilder.java +++ b/core/api/src/main/java/com/blazebit/persistence/CriteriaBuilder.java @@ -5,7 +5,7 @@ package com.blazebit.persistence; -import javax.persistence.TypedQuery; +import jakarta.persistence.TypedQuery; /** * A builder for criteria queries. This is the entry point for building queries. diff --git a/core/api/src/main/java/com/blazebit/persistence/CriteriaBuilderFactory.java b/core/api/src/main/java/com/blazebit/persistence/CriteriaBuilderFactory.java index 56292e1ce8..dc7f3d7cca 100644 --- a/core/api/src/main/java/com/blazebit/persistence/CriteriaBuilderFactory.java +++ b/core/api/src/main/java/com/blazebit/persistence/CriteriaBuilderFactory.java @@ -9,7 +9,7 @@ import com.blazebit.persistence.spi.JpqlFunction; import com.blazebit.persistence.spi.ServiceProvider; -import javax.persistence.EntityManager; +import jakarta.persistence.EntityManager; import java.util.Map; /** @@ -41,7 +41,7 @@ public interface CriteriaBuilderFactory extends ServiceProvider, ConfigurationSo public StartOngoingSetOperationCriteriaBuilder> startSet(EntityManager entityManager, Class resultClass); /** - * Like {@link CriteriaBuilderFactory#create(javax.persistence.EntityManager, java.lang.Class, java.lang.String)} but with the alias + * Like {@link CriteriaBuilderFactory#create(jakarta.persistence.EntityManager, java.lang.Class, java.lang.String)} but with the alias * equivalent to the camel cased result of what {@link Class#getSimpleName()} of the result class returns. * * @param entityManager The entity manager to use for the criteria builder @@ -65,7 +65,7 @@ public interface CriteriaBuilderFactory extends ServiceProvider, ConfigurationSo public CriteriaBuilder create(EntityManager entityManager, Class resultClass, String alias); /** - * Like {@link CriteriaBuilderFactory#delete(javax.persistence.EntityManager, java.lang.Class, java.lang.String)} but with the alias + * Like {@link CriteriaBuilderFactory#delete(jakarta.persistence.EntityManager, java.lang.Class, java.lang.String)} but with the alias * equivalent to the camel cased result of what {@link Class#getSimpleName()} of the delete class returns. * * @param entityManager The entity manager to use for the delete criteria builder @@ -89,7 +89,7 @@ public interface CriteriaBuilderFactory extends ServiceProvider, ConfigurationSo public DeleteCriteriaBuilder delete(EntityManager entityManager, Class deleteClass, String alias); /** - * Like {@link CriteriaBuilderFactory#deleteCollection(javax.persistence.EntityManager, java.lang.Class, java.lang.String, java.lang.String)} but with the alias + * Like {@link CriteriaBuilderFactory#deleteCollection(jakarta.persistence.EntityManager, java.lang.Class, java.lang.String, java.lang.String)} but with the alias * equivalent to the camel cased result of what {@link Class#getSimpleName()} of the delete owner class returns. * * @param entityManager The entity manager to use for the delete criteria builder @@ -116,7 +116,7 @@ public interface CriteriaBuilderFactory extends ServiceProvider, ConfigurationSo public DeleteCriteriaBuilder deleteCollection(EntityManager entityManager, Class deleteOwnerClass, String alias, String collectionName); /** - * Like {@link CriteriaBuilderFactory#update(javax.persistence.EntityManager, java.lang.Class, java.lang.String)} but with the alias + * Like {@link CriteriaBuilderFactory#update(jakarta.persistence.EntityManager, java.lang.Class, java.lang.String)} but with the alias * equivalent to the camel cased result of what {@link Class#getSimpleName()} of the update class returns. * * @param entityManager The entity manager to use for the update criteria builder @@ -140,7 +140,7 @@ public interface CriteriaBuilderFactory extends ServiceProvider, ConfigurationSo public UpdateCriteriaBuilder update(EntityManager entityManager, Class updateClass, String alias); /** - * Like {@link CriteriaBuilderFactory#updateCollection(javax.persistence.EntityManager, java.lang.Class, java.lang.String, java.lang.String)} but with the alias + * Like {@link CriteriaBuilderFactory#updateCollection(jakarta.persistence.EntityManager, java.lang.Class, java.lang.String, java.lang.String)} but with the alias * equivalent to the camel cased result of what {@link Class#getSimpleName()} of the delete owner class returns. * * @param entityManager The entity manager to use for the update criteria builder diff --git a/core/api/src/main/java/com/blazebit/persistence/DefaultPackageOpener.java b/core/api/src/main/java/com/blazebit/persistence/DefaultPackageOpener.java index 69101cd343..bfdd3c644a 100644 --- a/core/api/src/main/java/com/blazebit/persistence/DefaultPackageOpener.java +++ b/core/api/src/main/java/com/blazebit/persistence/DefaultPackageOpener.java @@ -8,7 +8,7 @@ import com.blazebit.persistence.spi.PackageOpener; /** - * A no-op package opener for pre-Java 9. + * A package opener that works with Java 9 modules. * * @author Christian Beikov * @since 1.2.0 @@ -22,5 +22,9 @@ private DefaultPackageOpener() { @Override public void openPackageIfNeeded(Class targetClass, String targetPackage, Class implementationClass) { + Module targetModule = targetClass.getModule(); + if (!targetModule.isOpen(targetPackage, implementationClass.getModule())) { + targetModule.addOpens(targetPackage, implementationClass.getModule()); + } } } diff --git a/core/api/src/main/java/com/blazebit/persistence/Executable.java b/core/api/src/main/java/com/blazebit/persistence/Executable.java index 48d5a6f116..e397ac1302 100644 --- a/core/api/src/main/java/com/blazebit/persistence/Executable.java +++ b/core/api/src/main/java/com/blazebit/persistence/Executable.java @@ -5,7 +5,7 @@ package com.blazebit.persistence; -import javax.persistence.Query; +import jakarta.persistence.Query; /** * A base interface for executable query builders. diff --git a/core/api/src/main/java/com/blazebit/persistence/From.java b/core/api/src/main/java/com/blazebit/persistence/From.java index 1f2238f596..04542cf0a4 100644 --- a/core/api/src/main/java/com/blazebit/persistence/From.java +++ b/core/api/src/main/java/com/blazebit/persistence/From.java @@ -5,7 +5,7 @@ package com.blazebit.persistence; -import javax.persistence.metamodel.Type; +import jakarta.persistence.metamodel.Type; /** * CAREFUL, this is an experimental API and will change! diff --git a/core/api/src/main/java/com/blazebit/persistence/FromBaseBuilder.java b/core/api/src/main/java/com/blazebit/persistence/FromBaseBuilder.java index 581423e96f..9491b9f5c9 100644 --- a/core/api/src/main/java/com/blazebit/persistence/FromBaseBuilder.java +++ b/core/api/src/main/java/com/blazebit/persistence/FromBaseBuilder.java @@ -5,7 +5,7 @@ package com.blazebit.persistence; -import javax.persistence.metamodel.EntityType; +import jakarta.persistence.metamodel.EntityType; import java.util.Collection; /** @@ -98,7 +98,7 @@ public interface FromBaseBuilder> { * This introduces a parameter named like the given alias. * * To set the values invoke {@link CommonQueryBuilder#setParameter(String, Object)} - * or {@link javax.persistence.Query#setParameter(String, Object)} with the alias and a collection. + * or {@link jakarta.persistence.Query#setParameter(String, Object)} with the alias and a collection. * * @param valueClass The class of the basic or managed type for which to create a VALUES clause * @param alias The alias for the entity @@ -113,7 +113,7 @@ public interface FromBaseBuilder> { * This introduces a parameter named like the given alias. * * To set the values invoke {@link CommonQueryBuilder#setParameter(String, Object)} - * or {@link javax.persistence.Query#setParameter(String, Object)} with the alias and a collection. + * or {@link jakarta.persistence.Query#setParameter(String, Object)} with the alias and a collection. * * @param entityBaseClass The entity class on which the attribute is located * @param attributeName The attribute name within the entity class which to use for determining the values type @@ -131,7 +131,7 @@ public interface FromBaseBuilder> { * In contrast to {@link FromBaseBuilder#fromValues(Class, String, int)} this will only bind the id attribute. * * To set the values invoke {@link CommonQueryBuilder#setParameter(String, Object)} - * or {@link javax.persistence.Query#setParameter(String, Object)} with the alias and a collection. + * or {@link jakarta.persistence.Query#setParameter(String, Object)} with the alias and a collection. * * @param valueClass The class of the identifiable type for which to create a VALUES clause * @param alias The alias for the entity @@ -148,7 +148,7 @@ public interface FromBaseBuilder> { * In contrast to {@link FromBaseBuilder#fromValues(Class, String, int)} this will only bind the identifier attribute. * * To set the values invoke {@link CommonQueryBuilder#setParameter(String, Object)} - * or {@link javax.persistence.Query#setParameter(String, Object)} with the alias and a collection. + * or {@link jakarta.persistence.Query#setParameter(String, Object)} with the alias and a collection. * * @param valueClass The class of the identifiable type for which to create a VALUES clause * @param identifierAttribute The attribute of the entity type to consider as identifier attribute diff --git a/core/api/src/main/java/com/blazebit/persistence/FromBuilder.java b/core/api/src/main/java/com/blazebit/persistence/FromBuilder.java index c9765895a6..d0c171a5bd 100644 --- a/core/api/src/main/java/com/blazebit/persistence/FromBuilder.java +++ b/core/api/src/main/java/com/blazebit/persistence/FromBuilder.java @@ -5,7 +5,7 @@ package com.blazebit.persistence; -import javax.persistence.metamodel.EntityType; +import jakarta.persistence.metamodel.EntityType; import java.util.Collection; import java.util.Set; @@ -189,7 +189,7 @@ public interface FromBuilder> extends FromBaseBuilder joinOn(String base, Class entityClass, String alias, JoinType type); /** - * Like {@link FromBuilder#joinOn(java.lang.String, javax.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with + * Like {@link FromBuilder#joinOn(java.lang.String, jakarta.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with * the query root assumed as base. * * @param entityType The entity type to join @@ -237,7 +237,7 @@ public interface FromBuilder> extends FromBaseBuilder> joinOnSubquery(String base, Class entityClass, String alias, JoinType type); /** - * Like {@link FromBuilder#joinOnSubquery(java.lang.String, javax.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with + * Like {@link FromBuilder#joinOnSubquery(java.lang.String, jakarta.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with * the query root assumed as base. * * @param entityType The entity type to join @@ -317,7 +317,7 @@ public interface FromBuilder> extends FromBaseBuilder, ? extends Z>> Z joinOnEntitySubquery(String base, Class entityClass, String alias, String subqueryAlias, JoinType type); /** - * Like {@link FromBuilder#joinOnEntitySubquery(java.lang.String, javax.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with + * Like {@link FromBuilder#joinOnEntitySubquery(java.lang.String, jakarta.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with * the query root assumed as base. * * @param entityType The entity type to join @@ -344,7 +344,7 @@ public interface FromBuilder> extends FromBaseBuilder, ? extends Z>> Z joinOnEntitySubquery(String base, EntityType entityType, String alias, JoinType type); /** - * Like {@link FromBuilder#joinOnEntitySubquery(java.lang.String, javax.persistence.metamodel.EntityType, java.lang.String, java.lang.String, com.blazebit.persistence.JoinType) } but with + * Like {@link FromBuilder#joinOnEntitySubquery(java.lang.String, jakarta.persistence.metamodel.EntityType, java.lang.String, java.lang.String, com.blazebit.persistence.JoinType) } but with * the query root assumed as base. * * @param entityType The entity type to join @@ -397,7 +397,7 @@ public interface FromBuilder> extends FromBaseBuilder> joinLateralOnSubquery(String base, Class entityClass, String alias, JoinType type); /** - * Like {@link FromBuilder#joinLateralOnSubquery(java.lang.String, javax.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with + * Like {@link FromBuilder#joinLateralOnSubquery(java.lang.String, jakarta.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with * the query root assumed as base. * * @param entityType The entity type to join @@ -450,7 +450,7 @@ public interface FromBuilder> extends FromBaseBuilder, ? extends Z>> Z joinLateralOnEntitySubquery(String base, Class entityClass, String alias, String subqueryAlias, JoinType type); /** - * Like {@link FromBuilder#joinLateralOnEntitySubquery(java.lang.String, javax.persistence.metamodel.EntityType, java.lang.String, java.lang.String, com.blazebit.persistence.JoinType) } but with + * Like {@link FromBuilder#joinLateralOnEntitySubquery(java.lang.String, jakarta.persistence.metamodel.EntityType, java.lang.String, java.lang.String, com.blazebit.persistence.JoinType) } but with * the query root assumed as base. * * @param entityType The entity type to join @@ -528,7 +528,7 @@ public interface FromBuilder> extends FromBaseBuilder joinLateralSubquery(String base, Class entityClass, String alias, JoinType type); /** - * Like {@link FromBuilder#joinLateralSubquery(java.lang.String, javax.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with + * Like {@link FromBuilder#joinLateralSubquery(java.lang.String, jakarta.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with * the query root assumed as base. * * @param entityType The entity type to join @@ -581,7 +581,7 @@ public interface FromBuilder> extends FromBaseBuilder> Z joinLateralEntitySubquery(String base, Class entityClass, String alias, String subqueryAlias, JoinType type); /** - * Like {@link FromBuilder#joinLateralEntitySubquery(java.lang.String, javax.persistence.metamodel.EntityType, java.lang.String, java.lang.String, com.blazebit.persistence.JoinType) } but with + * Like {@link FromBuilder#joinLateralEntitySubquery(java.lang.String, jakarta.persistence.metamodel.EntityType, java.lang.String, java.lang.String, com.blazebit.persistence.JoinType) } but with * the query root assumed as base. * * @param entityType The entity type to join @@ -698,7 +698,7 @@ public interface FromBuilder> extends FromBaseBuilder innerJoinOn(String base, Class entityClass, String alias); /** - * Like {@link FromBuilder#joinOn(javax.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with + * Like {@link FromBuilder#joinOn(jakarta.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with * {@link JoinType#INNER}. * * @param entityType The entity type to join @@ -709,7 +709,7 @@ public interface FromBuilder> extends FromBaseBuilder innerJoinOn(EntityType entityType, String alias); /** - * Like {@link FromBuilder#joinOn(java.lang.String, javax.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with + * Like {@link FromBuilder#joinOn(java.lang.String, jakarta.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with * {@link JoinType#INNER}. * * @param base The base node on which to join @@ -744,7 +744,7 @@ public interface FromBuilder> extends FromBaseBuilder> innerJoinOnSubquery(String base, Class entityClass, String alias); /** - * Like {@link FromBuilder#joinOnSubquery(javax.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with + * Like {@link FromBuilder#joinOnSubquery(jakarta.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with * {@link JoinType#INNER}. * * @param entityType The entity type to join @@ -755,7 +755,7 @@ public interface FromBuilder> extends FromBaseBuilder> innerJoinOnSubquery(EntityType entityType, String alias); /** - * Like {@link FromBuilder#joinOnSubquery(java.lang.String, javax.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with + * Like {@link FromBuilder#joinOnSubquery(java.lang.String, jakarta.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with * {@link JoinType#INNER}. * * @param base The base node on which to join @@ -792,7 +792,7 @@ public interface FromBuilder> extends FromBaseBuilder, ? extends Z>> Z innerJoinOnEntitySubquery(String base, Class entityClass, String alias); /** - * Like {@link FromBuilder#joinOnEntitySubquery(javax.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with + * Like {@link FromBuilder#joinOnEntitySubquery(jakarta.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with * {@link JoinType#INNER}. * * @param entityType The entity type to join @@ -804,7 +804,7 @@ public interface FromBuilder> extends FromBaseBuilder, ? extends Z>> Z innerJoinOnEntitySubquery(EntityType entityType, String alias); /** - * Like {@link FromBuilder#joinOnEntitySubquery(java.lang.String, javax.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with + * Like {@link FromBuilder#joinOnEntitySubquery(java.lang.String, jakarta.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with * {@link JoinType#INNER}. * * @param base The base node on which to join @@ -844,7 +844,7 @@ public interface FromBuilder> extends FromBaseBuilder, ? extends Z>> Z innerJoinOnEntitySubquery(String base, Class entityClass, String alias, String subqueryAlias); /** - * Like {@link FromBuilder#joinOnEntitySubquery(javax.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with + * Like {@link FromBuilder#joinOnEntitySubquery(jakarta.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with * {@link JoinType#INNER}. * * @param entityType The entity type to join @@ -857,7 +857,7 @@ public interface FromBuilder> extends FromBaseBuilder, ? extends Z>> Z innerJoinOnEntitySubquery(EntityType entityType, String alias, String subqueryAlias); /** - * Like {@link FromBuilder#joinOnEntitySubquery(java.lang.String, javax.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with + * Like {@link FromBuilder#joinOnEntitySubquery(java.lang.String, jakarta.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with * {@link JoinType#INNER}. * * @param base The base node on which to join @@ -894,7 +894,7 @@ public interface FromBuilder> extends FromBaseBuilder> innerJoinLateralOnSubquery(String base, Class entityClass, String alias); /** - * Like {@link FromBuilder#joinLateralOnSubquery(javax.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with + * Like {@link FromBuilder#joinLateralOnSubquery(jakarta.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with * {@link JoinType#INNER}. * * @param entityType The entity type to join @@ -905,7 +905,7 @@ public interface FromBuilder> extends FromBaseBuilder> innerJoinLateralOnSubquery(EntityType entityType, String alias); /** - * Like {@link FromBuilder#joinLateralOnSubquery(java.lang.String, javax.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with + * Like {@link FromBuilder#joinLateralOnSubquery(java.lang.String, jakarta.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with * {@link JoinType#INNER}. * * @param base The base node on which to join @@ -944,7 +944,7 @@ public interface FromBuilder> extends FromBaseBuilder, ? extends Z>> Z innerJoinLateralOnEntitySubquery(String base, Class entityClass, String alias, String subqueryAlias); /** - * Like {@link FromBuilder#joinLateralOnEntitySubquery(javax.persistence.metamodel.EntityType, java.lang.String, java.lang.String, com.blazebit.persistence.JoinType) } but with + * Like {@link FromBuilder#joinLateralOnEntitySubquery(jakarta.persistence.metamodel.EntityType, java.lang.String, java.lang.String, com.blazebit.persistence.JoinType) } but with * {@link JoinType#INNER}. * * @param entityType The entity type to join @@ -957,7 +957,7 @@ public interface FromBuilder> extends FromBaseBuilder, ? extends Z>> Z innerJoinLateralOnEntitySubquery(EntityType entityType, String alias, String subqueryAlias); /** - * Like {@link FromBuilder#joinLateralOnEntitySubquery(java.lang.String, javax.persistence.metamodel.EntityType, java.lang.String, java.lang.String, com.blazebit.persistence.JoinType) } but with + * Like {@link FromBuilder#joinLateralOnEntitySubquery(java.lang.String, jakarta.persistence.metamodel.EntityType, java.lang.String, java.lang.String, com.blazebit.persistence.JoinType) } but with * {@link JoinType#INNER}. * * @param base The base node on which to join @@ -1019,7 +1019,7 @@ public interface FromBuilder> extends FromBaseBuilder innerJoinLateralSubquery(String base, Class entityClass, String alias); /** - * Like {@link FromBuilder#joinLateralSubquery(javax.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with + * Like {@link FromBuilder#joinLateralSubquery(jakarta.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with * {@link JoinType#INNER}. * * @param entityType The entity type to join @@ -1030,7 +1030,7 @@ public interface FromBuilder> extends FromBaseBuilder innerJoinLateralSubquery(EntityType entityType, String alias); /** - * Like {@link FromBuilder#joinLateralSubquery(java.lang.String, javax.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with + * Like {@link FromBuilder#joinLateralSubquery(java.lang.String, jakarta.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with * {@link JoinType#INNER}. * * @param base The base node on which to join @@ -1069,7 +1069,7 @@ public interface FromBuilder> extends FromBaseBuilder> Z innerJoinLateralEntitySubquery(String base, Class entityClass, String alias, String subqueryAlias); /** - * Like {@link FromBuilder#joinLateralEntitySubquery(javax.persistence.metamodel.EntityType, java.lang.String, java.lang.String, com.blazebit.persistence.JoinType) } but with + * Like {@link FromBuilder#joinLateralEntitySubquery(jakarta.persistence.metamodel.EntityType, java.lang.String, java.lang.String, com.blazebit.persistence.JoinType) } but with * {@link JoinType#INNER}. * * @param entityType The entity type to join @@ -1082,7 +1082,7 @@ public interface FromBuilder> extends FromBaseBuilder> Z innerJoinLateralEntitySubquery(EntityType entityType, String alias, String subqueryAlias); /** - * Like {@link FromBuilder#joinLateralEntitySubquery(java.lang.String, javax.persistence.metamodel.EntityType, java.lang.String, java.lang.String, com.blazebit.persistence.JoinType) } but with + * Like {@link FromBuilder#joinLateralEntitySubquery(java.lang.String, jakarta.persistence.metamodel.EntityType, java.lang.String, java.lang.String, com.blazebit.persistence.JoinType) } but with * {@link JoinType#INNER}. * * @param base The base node on which to join @@ -1184,7 +1184,7 @@ public interface FromBuilder> extends FromBaseBuilder leftJoinOn(String base, Class entityClass, String alias); /** - * Like {@link FromBuilder#joinOn(javax.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with + * Like {@link FromBuilder#joinOn(jakarta.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with * {@link JoinType#LEFT}. * * @param entityType The entity type to join @@ -1195,7 +1195,7 @@ public interface FromBuilder> extends FromBaseBuilder leftJoinOn(EntityType entityType, String alias); /** - * Like {@link FromBuilder#joinOn(java.lang.String, javax.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with + * Like {@link FromBuilder#joinOn(java.lang.String, jakarta.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with * {@link JoinType#LEFT}. * * @param base The base node on which to join @@ -1230,7 +1230,7 @@ public interface FromBuilder> extends FromBaseBuilder> leftJoinOnSubquery(String base, Class entityClass, String alias); /** - * Like {@link FromBuilder#joinOnSubquery(javax.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with + * Like {@link FromBuilder#joinOnSubquery(jakarta.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with * {@link JoinType#LEFT}. * * @param entityType The entity type to join @@ -1241,7 +1241,7 @@ public interface FromBuilder> extends FromBaseBuilder> leftJoinOnSubquery(EntityType entityType, String alias); /** - * Like {@link FromBuilder#joinOnSubquery(java.lang.String, javax.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with + * Like {@link FromBuilder#joinOnSubquery(java.lang.String, jakarta.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with * {@link JoinType#LEFT}. * * @param base The base node on which to join @@ -1278,7 +1278,7 @@ public interface FromBuilder> extends FromBaseBuilder, ? extends Z>> Z leftJoinOnEntitySubquery(String base, Class entityClass, String alias); /** - * Like {@link FromBuilder#joinOnEntitySubquery(javax.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with + * Like {@link FromBuilder#joinOnEntitySubquery(jakarta.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with * {@link JoinType#LEFT}. * * @param entityType The entity type to join @@ -1290,7 +1290,7 @@ public interface FromBuilder> extends FromBaseBuilder, ? extends Z>> Z leftJoinOnEntitySubquery(EntityType entityType, String alias); /** - * Like {@link FromBuilder#joinOnEntitySubquery(java.lang.String, javax.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with + * Like {@link FromBuilder#joinOnEntitySubquery(java.lang.String, jakarta.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with * {@link JoinType#LEFT}. * * @param base The base node on which to join @@ -1330,7 +1330,7 @@ public interface FromBuilder> extends FromBaseBuilder, ? extends Z>> Z leftJoinOnEntitySubquery(String base, Class entityClass, String alias, String subqueryAlias); /** - * Like {@link FromBuilder#joinOnEntitySubquery(javax.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with + * Like {@link FromBuilder#joinOnEntitySubquery(jakarta.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with * {@link JoinType#LEFT}. * * @param entityType The entity type to join @@ -1343,7 +1343,7 @@ public interface FromBuilder> extends FromBaseBuilder, ? extends Z>> Z leftJoinOnEntitySubquery(EntityType entityType, String alias, String subqueryAlias); /** - * Like {@link FromBuilder#joinOnEntitySubquery(java.lang.String, javax.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with + * Like {@link FromBuilder#joinOnEntitySubquery(java.lang.String, jakarta.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with * {@link JoinType#LEFT}. * * @param base The base node on which to join @@ -1380,7 +1380,7 @@ public interface FromBuilder> extends FromBaseBuilder> leftJoinLateralOnSubquery(String base, Class entityClass, String alias); /** - * Like {@link FromBuilder#joinLateralOnSubquery(javax.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with + * Like {@link FromBuilder#joinLateralOnSubquery(jakarta.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with * {@link JoinType#LEFT}. * * @param entityType The entity type to join @@ -1391,7 +1391,7 @@ public interface FromBuilder> extends FromBaseBuilder> leftJoinLateralOnSubquery(EntityType entityType, String alias); /** - * Like {@link FromBuilder#joinLateralOnSubquery(java.lang.String, javax.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with + * Like {@link FromBuilder#joinLateralOnSubquery(java.lang.String, jakarta.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with * {@link JoinType#LEFT}. * * @param base The base node on which to join @@ -1430,7 +1430,7 @@ public interface FromBuilder> extends FromBaseBuilder, ? extends Z>> Z leftJoinLateralOnEntitySubquery(String base, Class entityClass, String alias, String subqueryAlias); /** - * Like {@link FromBuilder#joinLateralOnEntitySubquery(javax.persistence.metamodel.EntityType, java.lang.String, java.lang.String, com.blazebit.persistence.JoinType) } but with + * Like {@link FromBuilder#joinLateralOnEntitySubquery(jakarta.persistence.metamodel.EntityType, java.lang.String, java.lang.String, com.blazebit.persistence.JoinType) } but with * {@link JoinType#LEFT}. * * @param entityType The entity type to join @@ -1443,7 +1443,7 @@ public interface FromBuilder> extends FromBaseBuilder, ? extends Z>> Z leftJoinLateralOnEntitySubquery(EntityType entityType, String alias, String subqueryAlias); /** - * Like {@link FromBuilder#joinLateralOnEntitySubquery(java.lang.String, javax.persistence.metamodel.EntityType, java.lang.String, java.lang.String, com.blazebit.persistence.JoinType) } but with + * Like {@link FromBuilder#joinLateralOnEntitySubquery(java.lang.String, jakarta.persistence.metamodel.EntityType, java.lang.String, java.lang.String, com.blazebit.persistence.JoinType) } but with * {@link JoinType#LEFT}. * * @param base The base node on which to join @@ -1505,7 +1505,7 @@ public interface FromBuilder> extends FromBaseBuilder leftJoinLateralSubquery(String base, Class entityClass, String alias); /** - * Like {@link FromBuilder#joinLateralSubquery(javax.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with + * Like {@link FromBuilder#joinLateralSubquery(jakarta.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with * {@link JoinType#LEFT}. * * @param entityType The entity type to join @@ -1516,7 +1516,7 @@ public interface FromBuilder> extends FromBaseBuilder leftJoinLateralSubquery(EntityType entityType, String alias); /** - * Like {@link FromBuilder#joinLateralSubquery(java.lang.String, javax.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with + * Like {@link FromBuilder#joinLateralSubquery(java.lang.String, jakarta.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with * {@link JoinType#LEFT}. * * @param base The base node on which to join @@ -1555,7 +1555,7 @@ public interface FromBuilder> extends FromBaseBuilder> Z leftJoinLateralEntitySubquery(String base, Class entityClass, String alias, String subqueryAlias); /** - * Like {@link FromBuilder#joinLateralEntitySubquery(javax.persistence.metamodel.EntityType, java.lang.String, java.lang.String, com.blazebit.persistence.JoinType) } but with + * Like {@link FromBuilder#joinLateralEntitySubquery(jakarta.persistence.metamodel.EntityType, java.lang.String, java.lang.String, com.blazebit.persistence.JoinType) } but with * {@link JoinType#LEFT}. * * @param entityType The entity type to join @@ -1568,7 +1568,7 @@ public interface FromBuilder> extends FromBaseBuilder> Z leftJoinLateralEntitySubquery(EntityType entityType, String alias, String subqueryAlias); /** - * Like {@link FromBuilder#joinLateralEntitySubquery(java.lang.String, javax.persistence.metamodel.EntityType, java.lang.String, java.lang.String, com.blazebit.persistence.JoinType) } but with + * Like {@link FromBuilder#joinLateralEntitySubquery(java.lang.String, jakarta.persistence.metamodel.EntityType, java.lang.String, java.lang.String, com.blazebit.persistence.JoinType) } but with * {@link JoinType#LEFT}. * * @param base The base node on which to join @@ -1670,7 +1670,7 @@ public interface FromBuilder> extends FromBaseBuilder rightJoinOn(String base, Class entityClass, String alias); /** - * Like {@link FromBuilder#joinOn(javax.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with + * Like {@link FromBuilder#joinOn(jakarta.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with * {@link JoinType#RIGHT}. * * @param entityType The entity type to join @@ -1681,7 +1681,7 @@ public interface FromBuilder> extends FromBaseBuilder rightJoinOn(EntityType entityType, String alias); /** - * Like {@link FromBuilder#joinOn(java.lang.String, javax.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with + * Like {@link FromBuilder#joinOn(java.lang.String, jakarta.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with * {@link JoinType#RIGHT}. * * @param base The base node on which to join @@ -1716,7 +1716,7 @@ public interface FromBuilder> extends FromBaseBuilder> rightJoinOnSubquery(String base, Class entityClass, String alias); /** - * Like {@link FromBuilder#joinOnSubquery(javax.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with + * Like {@link FromBuilder#joinOnSubquery(jakarta.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with * {@link JoinType#RIGHT}. * * @param entityType The entity type to join @@ -1727,7 +1727,7 @@ public interface FromBuilder> extends FromBaseBuilder> rightJoinOnSubquery(EntityType entityType, String alias); /** - * Like {@link FromBuilder#joinOnSubquery(java.lang.String, javax.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with + * Like {@link FromBuilder#joinOnSubquery(java.lang.String, jakarta.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with * {@link JoinType#RIGHT}. * * @param base The base node on which to join @@ -1764,7 +1764,7 @@ public interface FromBuilder> extends FromBaseBuilder, ? extends Z>> Z rightJoinOnEntitySubquery(String base, Class entityClass, String alias); /** - * Like {@link FromBuilder#joinOnEntitySubquery(javax.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with + * Like {@link FromBuilder#joinOnEntitySubquery(jakarta.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with * {@link JoinType#RIGHT}. * * @param entityType The entity type to join @@ -1776,7 +1776,7 @@ public interface FromBuilder> extends FromBaseBuilder, ? extends Z>> Z rightJoinOnEntitySubquery(EntityType entityType, String alias); /** - * Like {@link FromBuilder#joinOnEntitySubquery(java.lang.String, javax.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with + * Like {@link FromBuilder#joinOnEntitySubquery(java.lang.String, jakarta.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with * {@link JoinType#RIGHT}. * * @param base The base node on which to join @@ -1816,7 +1816,7 @@ public interface FromBuilder> extends FromBaseBuilder, ? extends Z>> Z rightJoinOnEntitySubquery(String base, Class entityClass, String alias, String subqueryAlias); /** - * Like {@link FromBuilder#joinOnEntitySubquery(javax.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with + * Like {@link FromBuilder#joinOnEntitySubquery(jakarta.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with * {@link JoinType#RIGHT}. * * @param entityType The entity type to join @@ -1829,7 +1829,7 @@ public interface FromBuilder> extends FromBaseBuilder, ? extends Z>> Z rightJoinOnEntitySubquery(EntityType entityType, String alias, String subqueryAlias); /** - * Like {@link FromBuilder#joinOnEntitySubquery(java.lang.String, javax.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with + * Like {@link FromBuilder#joinOnEntitySubquery(java.lang.String, jakarta.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) } but with * {@link JoinType#RIGHT}. * * @param base The base node on which to join diff --git a/core/api/src/main/java/com/blazebit/persistence/FullQueryBuilder.java b/core/api/src/main/java/com/blazebit/persistence/FullQueryBuilder.java index fb45b9bc1a..47f322e3c1 100644 --- a/core/api/src/main/java/com/blazebit/persistence/FullQueryBuilder.java +++ b/core/api/src/main/java/com/blazebit/persistence/FullQueryBuilder.java @@ -5,7 +5,7 @@ package com.blazebit.persistence; -import javax.persistence.TypedQuery; +import jakarta.persistence.TypedQuery; import java.lang.reflect.Constructor; /** diff --git a/core/api/src/main/java/com/blazebit/persistence/ModificationCriteriaBuilder.java b/core/api/src/main/java/com/blazebit/persistence/ModificationCriteriaBuilder.java index acf1644144..b93218bc9b 100644 --- a/core/api/src/main/java/com/blazebit/persistence/ModificationCriteriaBuilder.java +++ b/core/api/src/main/java/com/blazebit/persistence/ModificationCriteriaBuilder.java @@ -5,8 +5,8 @@ package com.blazebit.persistence; -import javax.persistence.Tuple; -import javax.persistence.TypedQuery; +import jakarta.persistence.Tuple; +import jakarta.persistence.TypedQuery; /** * A builder for modification queries. diff --git a/core/api/src/main/java/com/blazebit/persistence/PaginatedCriteriaBuilder.java b/core/api/src/main/java/com/blazebit/persistence/PaginatedCriteriaBuilder.java index 0ec887ea24..cbdf092cb5 100644 --- a/core/api/src/main/java/com/blazebit/persistence/PaginatedCriteriaBuilder.java +++ b/core/api/src/main/java/com/blazebit/persistence/PaginatedCriteriaBuilder.java @@ -5,7 +5,7 @@ package com.blazebit.persistence; -import javax.persistence.TypedQuery; +import jakarta.persistence.TypedQuery; /** * A builder for paginated criteria queries. diff --git a/core/api/src/main/java/com/blazebit/persistence/PaginatedTypedQuery.java b/core/api/src/main/java/com/blazebit/persistence/PaginatedTypedQuery.java index f3f4cb2e0d..eda96bafbf 100644 --- a/core/api/src/main/java/com/blazebit/persistence/PaginatedTypedQuery.java +++ b/core/api/src/main/java/com/blazebit/persistence/PaginatedTypedQuery.java @@ -5,7 +5,7 @@ package com.blazebit.persistence; -import javax.persistence.TypedQuery; +import jakarta.persistence.TypedQuery; import java.util.List; /** diff --git a/core/api/src/main/java/com/blazebit/persistence/ParameterHolder.java b/core/api/src/main/java/com/blazebit/persistence/ParameterHolder.java index edeb109da9..0475751dc1 100644 --- a/core/api/src/main/java/com/blazebit/persistence/ParameterHolder.java +++ b/core/api/src/main/java/com/blazebit/persistence/ParameterHolder.java @@ -5,9 +5,9 @@ package com.blazebit.persistence; -import javax.persistence.Parameter; -import javax.persistence.TemporalType; -import javax.persistence.criteria.ParameterExpression; +import jakarta.persistence.Parameter; +import jakarta.persistence.TemporalType; +import jakarta.persistence.criteria.ParameterExpression; import java.util.Calendar; import java.util.Date; import java.util.Set; diff --git a/core/api/src/main/java/com/blazebit/persistence/Path.java b/core/api/src/main/java/com/blazebit/persistence/Path.java index eccda37a17..5cf61d7e02 100644 --- a/core/api/src/main/java/com/blazebit/persistence/Path.java +++ b/core/api/src/main/java/com/blazebit/persistence/Path.java @@ -5,7 +5,7 @@ package com.blazebit.persistence; -import javax.persistence.metamodel.Type; +import jakarta.persistence.metamodel.Type; /** * CAREFUL, this is an experimental API and will change! diff --git a/core/api/src/main/java/com/blazebit/persistence/QueryBuilder.java b/core/api/src/main/java/com/blazebit/persistence/QueryBuilder.java index 69c2edf820..5d061646be 100644 --- a/core/api/src/main/java/com/blazebit/persistence/QueryBuilder.java +++ b/core/api/src/main/java/com/blazebit/persistence/QueryBuilder.java @@ -6,7 +6,7 @@ package com.blazebit.persistence; -import javax.persistence.EntityManager; +import jakarta.persistence.EntityManager; /** * A base interface for builders that support normal query functionality. diff --git a/core/api/src/main/java/com/blazebit/persistence/Queryable.java b/core/api/src/main/java/com/blazebit/persistence/Queryable.java index e7d44c384b..cab51e8c45 100644 --- a/core/api/src/main/java/com/blazebit/persistence/Queryable.java +++ b/core/api/src/main/java/com/blazebit/persistence/Queryable.java @@ -5,7 +5,7 @@ package com.blazebit.persistence; -import javax.persistence.TypedQuery; +import jakarta.persistence.TypedQuery; import java.util.List; import java.util.stream.Stream; diff --git a/core/api/src/main/java/com/blazebit/persistence/ReturningModificationCriteriaBuilderFactory.java b/core/api/src/main/java/com/blazebit/persistence/ReturningModificationCriteriaBuilderFactory.java index 26f4467e66..45819ee973 100644 --- a/core/api/src/main/java/com/blazebit/persistence/ReturningModificationCriteriaBuilderFactory.java +++ b/core/api/src/main/java/com/blazebit/persistence/ReturningModificationCriteriaBuilderFactory.java @@ -84,7 +84,7 @@ public interface ReturningModificationCriteriaBuilderFactory { public ReturningUpdateCriteriaBuilder update(Class updateClass, String alias); /** - * Like {@link CriteriaBuilderFactory#updateCollection(javax.persistence.EntityManager, java.lang.Class, java.lang.String, java.lang.String)} but with the alias + * Like {@link CriteriaBuilderFactory#updateCollection(jakarta.persistence.EntityManager, java.lang.Class, java.lang.String, java.lang.String)} but with the alias * equivalent to the camel cased result of what {@link Class#getSimpleName()} of the delete owner class returns. * * @param updateOwnerClass The entity class owning the collection for the update criteria diff --git a/core/api/src/main/java/com/blazebit/persistence/SubqueryInitiator.java b/core/api/src/main/java/com/blazebit/persistence/SubqueryInitiator.java index 25ea06f3eb..e16e40273b 100644 --- a/core/api/src/main/java/com/blazebit/persistence/SubqueryInitiator.java +++ b/core/api/src/main/java/com/blazebit/persistence/SubqueryInitiator.java @@ -5,7 +5,7 @@ package com.blazebit.persistence; -import javax.persistence.metamodel.EntityType; +import jakarta.persistence.metamodel.EntityType; import java.util.Collection; /** @@ -145,7 +145,7 @@ public interface SubqueryInitiator extends FromBaseBuilder * This introduces a parameter named like the given alias. * * To set the values invoke {@link SubqueryBuilder#setParameter(String, Object)} - * or {@link javax.persistence.Query#setParameter(String, Object)} with the alias and a collection. + * or {@link jakarta.persistence.Query#setParameter(String, Object)} with the alias and a collection. * * @param valueClass The class of the basic or managed type for which to create a VALUES clause * @param alias The alias for the entity @@ -161,7 +161,7 @@ public interface SubqueryInitiator extends FromBaseBuilder * This introduces a parameter named like the given alias. * * To set the values invoke {@link CommonQueryBuilder#setParameter(String, Object)} - * or {@link javax.persistence.Query#setParameter(String, Object)} with the alias and a collection. + * or {@link jakarta.persistence.Query#setParameter(String, Object)} with the alias and a collection. * * @param entityBaseClass The entity class on which the attribute is located * @param attributeName The attribute name within the entity class which to use for determining the values type @@ -180,7 +180,7 @@ public interface SubqueryInitiator extends FromBaseBuilder * In contrast to {@link SubqueryInitiator#fromValues(Class, String, int)} this will only bind the id attribute. * * To set the values invoke {@link SubqueryBuilder#setParameter(String, Object)} - * or {@link javax.persistence.Query#setParameter(String, Object)} with the alias and a collection. + * or {@link jakarta.persistence.Query#setParameter(String, Object)} with the alias and a collection. * * @param valueClass The class of the identifiable type for which to create a VALUES clause * @param alias The alias for the entity diff --git a/core/api/src/main/java/com/blazebit/persistence/spi/AttributePath.java b/core/api/src/main/java/com/blazebit/persistence/spi/AttributePath.java index 116946f276..2dfabc700c 100644 --- a/core/api/src/main/java/com/blazebit/persistence/spi/AttributePath.java +++ b/core/api/src/main/java/com/blazebit/persistence/spi/AttributePath.java @@ -5,7 +5,7 @@ package com.blazebit.persistence.spi; -import javax.persistence.metamodel.Attribute; +import jakarta.persistence.metamodel.Attribute; import java.util.List; /** diff --git a/core/api/src/main/java/com/blazebit/persistence/spi/CriteriaBuilderConfiguration.java b/core/api/src/main/java/com/blazebit/persistence/spi/CriteriaBuilderConfiguration.java index ab9540b4e3..6a3f99211b 100644 --- a/core/api/src/main/java/com/blazebit/persistence/spi/CriteriaBuilderConfiguration.java +++ b/core/api/src/main/java/com/blazebit/persistence/spi/CriteriaBuilderConfiguration.java @@ -7,7 +7,7 @@ import com.blazebit.persistence.CriteriaBuilderFactory; -import javax.persistence.EntityManagerFactory; +import jakarta.persistence.EntityManagerFactory; import java.util.List; import java.util.Map; import java.util.Properties; diff --git a/core/api/src/main/java/com/blazebit/persistence/spi/CriteriaBuilderConfigurationContributor.java b/core/api/src/main/java/com/blazebit/persistence/spi/CriteriaBuilderConfigurationContributor.java index 94c743eb48..aeccff7a85 100644 --- a/core/api/src/main/java/com/blazebit/persistence/spi/CriteriaBuilderConfigurationContributor.java +++ b/core/api/src/main/java/com/blazebit/persistence/spi/CriteriaBuilderConfigurationContributor.java @@ -8,7 +8,7 @@ /** * A bootstrap process hook for contributing settings to the {@link CriteriaBuilderConfiguration}. * {@code CriteriaBuilderConfigurationContributor} instances may be annotated with {@link Priority} - * (or {@code javax.annotation.Priority}) to influence the order in which they are registered. + * (or {@code jakarta.annotation.Priority}) to influence the order in which they are registered. * The range 0-500 is reserved for internal uses. 500 - 1000 is reserved for libraries and 1000+ * is for user provided contributors. * diff --git a/core/api/src/main/java/com/blazebit/persistence/spi/CteQueryWrapper.java b/core/api/src/main/java/com/blazebit/persistence/spi/CteQueryWrapper.java index 8843b504c3..74d76c8c6b 100644 --- a/core/api/src/main/java/com/blazebit/persistence/spi/CteQueryWrapper.java +++ b/core/api/src/main/java/com/blazebit/persistence/spi/CteQueryWrapper.java @@ -5,7 +5,7 @@ package com.blazebit.persistence.spi; -import javax.persistence.Query; +import jakarta.persistence.Query; import java.util.List; /** diff --git a/core/api/src/main/java/com/blazebit/persistence/spi/DbmsDialect.java b/core/api/src/main/java/com/blazebit/persistence/spi/DbmsDialect.java index 9c0007722a..63aa0019bc 100644 --- a/core/api/src/main/java/com/blazebit/persistence/spi/DbmsDialect.java +++ b/core/api/src/main/java/com/blazebit/persistence/spi/DbmsDialect.java @@ -39,11 +39,13 @@ public interface DbmsDialect { public boolean supportsNonRecursiveWithClause(); /** - * Returns true if the dbms supports the with clause head for aliasing, false otherwise. + * Returns true if the dbms supports pagination in the with clause directly or needs to alias selection items. + * This is only needed for Hibernate ORM which uses Oracles {@code fetch first} syntax, + * since that is implemented through a query rewrite that needs aliases. * - * @return Whether the with clause head is supported by the dbms + * @return Whether pagination is supported in the with clause head by the dbms */ - public boolean supportsWithClauseHead(); + public boolean supportsPaginationInWithClause(); /** * Returns the SQL representation for the normal or recursive with clause. diff --git a/core/api/src/main/java/com/blazebit/persistence/spi/EntityManagerFactoryIntegrator.java b/core/api/src/main/java/com/blazebit/persistence/spi/EntityManagerFactoryIntegrator.java index bf9674528f..60da45e476 100644 --- a/core/api/src/main/java/com/blazebit/persistence/spi/EntityManagerFactoryIntegrator.java +++ b/core/api/src/main/java/com/blazebit/persistence/spi/EntityManagerFactoryIntegrator.java @@ -5,7 +5,7 @@ package com.blazebit.persistence.spi; -import javax.persistence.EntityManagerFactory; +import jakarta.persistence.EntityManagerFactory; import java.util.Map; /** diff --git a/core/api/src/main/java/com/blazebit/persistence/spi/ExtendedAttribute.java b/core/api/src/main/java/com/blazebit/persistence/spi/ExtendedAttribute.java index 2945aef212..76324e5a5b 100644 --- a/core/api/src/main/java/com/blazebit/persistence/spi/ExtendedAttribute.java +++ b/core/api/src/main/java/com/blazebit/persistence/spi/ExtendedAttribute.java @@ -7,14 +7,14 @@ import com.blazebit.persistence.JoinType; -import javax.persistence.metamodel.Attribute; -import javax.persistence.metamodel.EntityType; +import jakarta.persistence.metamodel.Attribute; +import jakarta.persistence.metamodel.EntityType; import java.util.List; import java.util.Map; import java.util.Set; /** - * This is a wrapper around the JPA {@link javax.persistence.metamodel.Attribute} that allows additionally efficient access to properties of the metamodel. + * This is a wrapper around the JPA {@link jakarta.persistence.metamodel.Attribute} that allows additionally efficient access to properties of the metamodel. * * @param The Java type represented by the managed type owning the attribute * @param The Java element type of the attribute diff --git a/core/api/src/main/java/com/blazebit/persistence/spi/ExtendedManagedType.java b/core/api/src/main/java/com/blazebit/persistence/spi/ExtendedManagedType.java index 0c709d8646..e81a9f9e9c 100644 --- a/core/api/src/main/java/com/blazebit/persistence/spi/ExtendedManagedType.java +++ b/core/api/src/main/java/com/blazebit/persistence/spi/ExtendedManagedType.java @@ -5,14 +5,14 @@ package com.blazebit.persistence.spi; -import javax.persistence.metamodel.EntityType; -import javax.persistence.metamodel.ManagedType; -import javax.persistence.metamodel.SingularAttribute; +import jakarta.persistence.metamodel.EntityType; +import jakarta.persistence.metamodel.ManagedType; +import jakarta.persistence.metamodel.SingularAttribute; import java.util.Map; import java.util.Set; /** - * This is a wrapper around the JPA {@link javax.persistence.metamodel.ManagedType} that allows additionally efficient access to properties of the metamodel. + * This is a wrapper around the JPA {@link jakarta.persistence.metamodel.ManagedType} that allows additionally efficient access to properties of the metamodel. * * @param The Java type represented by this managed type * @author Christian Beikov diff --git a/core/api/src/main/java/com/blazebit/persistence/spi/ExtendedQuerySupport.java b/core/api/src/main/java/com/blazebit/persistence/spi/ExtendedQuerySupport.java index 9699dfc5ae..e7cbd9efb4 100644 --- a/core/api/src/main/java/com/blazebit/persistence/spi/ExtendedQuerySupport.java +++ b/core/api/src/main/java/com/blazebit/persistence/spi/ExtendedQuerySupport.java @@ -7,8 +7,8 @@ import com.blazebit.persistence.ReturningResult; -import javax.persistence.EntityManager; -import javax.persistence.Query; +import jakarta.persistence.EntityManager; +import jakarta.persistence.Query; import java.util.List; /** diff --git a/core/api/src/main/java/com/blazebit/persistence/spi/JpaMetamodelAccessor.java b/core/api/src/main/java/com/blazebit/persistence/spi/JpaMetamodelAccessor.java index 6d9e3418a0..6f196f067e 100644 --- a/core/api/src/main/java/com/blazebit/persistence/spi/JpaMetamodelAccessor.java +++ b/core/api/src/main/java/com/blazebit/persistence/spi/JpaMetamodelAccessor.java @@ -5,10 +5,10 @@ package com.blazebit.persistence.spi; -import javax.persistence.metamodel.Attribute; -import javax.persistence.metamodel.EntityType; -import javax.persistence.metamodel.ManagedType; -import javax.persistence.metamodel.Metamodel; +import jakarta.persistence.metamodel.Attribute; +import jakarta.persistence.metamodel.EntityType; +import jakarta.persistence.metamodel.ManagedType; +import jakarta.persistence.metamodel.Metamodel; /** * @author Jan-Willem Gmelig Meyling diff --git a/core/api/src/main/java/com/blazebit/persistence/spi/JpaProvider.java b/core/api/src/main/java/com/blazebit/persistence/spi/JpaProvider.java index fc57738b04..3eb50dd462 100644 --- a/core/api/src/main/java/com/blazebit/persistence/spi/JpaProvider.java +++ b/core/api/src/main/java/com/blazebit/persistence/spi/JpaProvider.java @@ -7,10 +7,10 @@ import com.blazebit.persistence.JoinType; -import javax.persistence.EntityManager; -import javax.persistence.Query; -import javax.persistence.metamodel.EntityType; -import javax.persistence.metamodel.ManagedType; +import jakarta.persistence.EntityManager; +import jakarta.persistence.Query; +import jakarta.persistence.metamodel.EntityType; +import jakarta.persistence.metamodel.ManagedType; import java.util.List; import java.util.Map; @@ -511,15 +511,6 @@ public interface JpaProvider { */ public boolean supportsTransientEntityAsParameter(); - /** - * Indicates if the provider needs associations in the ON clause to use their id. - * If needed, an expression like alias.association in the ON clause is rewritten to - * alias.association.id. - * - * @return true if required, else false - */ - public boolean needsAssociationToIdRewriteInOnClause(); - /** * Indicates if the provider needs associations in the ON clause to use their id. * If needed, an expression like alias.association in the ON clause is rewritten to diff --git a/core/api/src/main/java/com/blazebit/persistence/spi/JpaProviderFactory.java b/core/api/src/main/java/com/blazebit/persistence/spi/JpaProviderFactory.java index dc1830ace9..f50ce20408 100644 --- a/core/api/src/main/java/com/blazebit/persistence/spi/JpaProviderFactory.java +++ b/core/api/src/main/java/com/blazebit/persistence/spi/JpaProviderFactory.java @@ -5,7 +5,7 @@ package com.blazebit.persistence.spi; -import javax.persistence.EntityManager; +import jakarta.persistence.EntityManager; /** * A service provider factory to create {@link JpaProvider} instances. diff --git a/core/api/src/main/java/com/blazebit/persistence/spi/JpqlFunction.java b/core/api/src/main/java/com/blazebit/persistence/spi/JpqlFunction.java index ca850fbd37..cc448bed72 100644 --- a/core/api/src/main/java/com/blazebit/persistence/spi/JpqlFunction.java +++ b/core/api/src/main/java/com/blazebit/persistence/spi/JpqlFunction.java @@ -12,7 +12,7 @@ * * @author Christian Beikov * @since 1.0.0 - * @see EntityManagerFactoryIntegrator#registerFunctions(javax.persistence.EntityManagerFactory, java.util.Map) + * @see EntityManagerFactoryIntegrator#registerFunctions(jakarta.persistence.EntityManagerFactory, java.util.Map) */ public interface JpqlFunction { diff --git a/core/api/src/main/java/module-info.java b/core/api/src/main/java/module-info.java new file mode 100644 index 0000000000..619c50a2c9 --- /dev/null +++ b/core/api/src/main/java/module-info.java @@ -0,0 +1,12 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * Copyright Blazebit + */ +module com.blazebit.persistence.core { + requires transitive java.sql; + requires transitive jakarta.persistence; + exports com.blazebit.persistence; + exports com.blazebit.persistence.spi; + exports com.blazebit.persistence.internal; + uses com.blazebit.persistence.spi.CriteriaBuilderConfigurationProvider; +} \ No newline at end of file diff --git a/core/api/src/main/java9/com/blazebit/persistence/DefaultPackageOpener.java b/core/api/src/main/java9/com/blazebit/persistence/DefaultPackageOpener.java deleted file mode 100644 index bfdd3c644a..0000000000 --- a/core/api/src/main/java9/com/blazebit/persistence/DefaultPackageOpener.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Blazebit - */ - -package com.blazebit.persistence; - -import com.blazebit.persistence.spi.PackageOpener; - -/** - * A package opener that works with Java 9 modules. - * - * @author Christian Beikov - * @since 1.2.0 - */ -class DefaultPackageOpener implements PackageOpener { - - static final PackageOpener INSTANCE = new DefaultPackageOpener(); - - private DefaultPackageOpener() { - } - - @Override - public void openPackageIfNeeded(Class targetClass, String targetPackage, Class implementationClass) { - Module targetModule = targetClass.getModule(); - if (!targetModule.isOpen(targetPackage, implementationClass.getModule())) { - targetModule.addOpens(targetPackage, implementationClass.getModule()); - } - } -} diff --git a/core/api/src/main/resources/META-INF/MANIFEST.MF b/core/api/src/main/resources/META-INF/MANIFEST.MF deleted file mode 100644 index e714012cef..0000000000 --- a/core/api/src/main/resources/META-INF/MANIFEST.MF +++ /dev/null @@ -1 +0,0 @@ -Multi-Release: true diff --git a/core/impl-jakarta/pom.xml b/core/impl-jakarta/pom.xml deleted file mode 100644 index cd6149d678..0000000000 --- a/core/impl-jakarta/pom.xml +++ /dev/null @@ -1,235 +0,0 @@ - - - - - 4.0.0 - - - com.blazebit - blaze-persistence-core - 1.6.15-SNAPSHOT - ../pom.xml - - - blaze-persistence-core-impl-jakarta - jar - - - com.blazebit.persistence.core.impl - - - - - ${project.groupId} - blaze-persistence-core-impl - provided - - - jakarta.persistence - jakarta.persistence-api - ${version.jakarta-jpa-api} - provided - - - ${project.groupId} - blaze-persistence-core-api-jakarta - - - ${project.groupId} - blaze-persistence-core-parser-jakarta - - - ${project.groupId} - blaze-common-utils - - - - - - - maven-antrun-plugin - - - transform-jar - package - - run - - - - - - - - - - - - - - - - - - - - - - transform-sources-jar - package - - run - - - - - - - - - - - - - - - - - - - - - - - - transform-javadoc - package - - run - - - - - - - - - - - - - - - - - - - - - - - - - unpack-classes - package - - - - - - - run - - - - - - org.eclipse.transformer - org.eclipse.transformer.cli - 0.5.0 - - - ant-contrib - ant-contrib - 1.0b3 - - - ant - ant - - - - - biz.aQute.bnd - biz.aQute.bnd.transform - ${version.bnd} - compile - - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - attach-artifacts - package - - attach-artifact - - - - - ${project.build.directory}/${project.build.finalName}-sources.jar - sources - jar - - - - - - - - - - - blazebit-release - - - - org.codehaus.mojo - build-helper-maven-plugin - - - attach-artifacts - package - - attach-artifact - - - - - ${project.build.directory}/${project.build.finalName}-sources.jar - sources - jar - - - ${project.build.directory}/${project.build.finalName}-javadoc.jar - javadoc - jar - - - - - - - - - - - - diff --git a/core/impl-jar/pom.xml b/core/impl-jar/pom.xml deleted file mode 100644 index 7cc7d237ee..0000000000 --- a/core/impl-jar/pom.xml +++ /dev/null @@ -1,129 +0,0 @@ - - - - - 4.0.0 - - - com.blazebit - blaze-persistence-core - 1.6.15-SNAPSHOT - ../pom.xml - - - blaze-persistence-core-impl-jar - jar - - - com.blazebit.persistence.core.impl - - - - - ${project.groupId} - blaze-persistence-core-api-jar - - - ${project.groupId} - blaze-persistence-core-parser-jar - - - ${project.groupId} - blaze-common-utils - - - ${project.groupId} - blaze-persistence-core-impl - - - - - - - org.apache.maven.plugins - maven-shade-plugin - - - package - - shade - - - true - - - ${project.groupId}:blaze-persistence-core-impl - - META-INF/versions/** - module-info.class - - - - - - - - - - - - - blazebit-release - - - - maven-dependency-plugin - - - shade-javadoc - - copy - - - - - ${project.groupId} - blaze-persistence-core-impl - ${project.version} - jar - javadoc - true - ${project.build.directory} - ${project.artifactId}-${project.version}-javadoc.jar - - - - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - attach-artifacts - package - - attach-artifact - - - - - ${project.build.directory}/${project.artifactId}-${project.version}-javadoc.jar - javadoc - jar - - - - - - - - - - - - diff --git a/core/impl/pom.xml b/core/impl/pom.xml index a4c422eb14..8df35c330e 100644 --- a/core/impl/pom.xml +++ b/core/impl/pom.xml @@ -10,7 +10,7 @@ com.blazebit blaze-persistence-core - 1.6.15-SNAPSHOT + 2.0.0-SNAPSHOT ../pom.xml @@ -39,7 +39,6 @@ blaze-common-utils - jakarta.persistence jakarta.persistence-api @@ -59,215 +58,6 @@ src/main/resources - - - org.moditect - moditect-maven-plugin - - - add-module-infos - package - - add-module-info - - - - - module ${module.name} { - requires java.sql; - requires java.persistence; - requires com.blazebit.common.utils; - requires com.blazebit.persistence.core; - requires com.blazebit.persistence.core.parser; - exports com.blazebit.persistence.impl; - exports com.blazebit.persistence.impl.builder.expression; - exports com.blazebit.persistence.impl.builder.object; - exports com.blazebit.persistence.impl.builder.predicate; - exports com.blazebit.persistence.impl.dialect; - exports com.blazebit.persistence.impl.function; - exports com.blazebit.persistence.impl.function.alias; - exports com.blazebit.persistence.impl.function.base64; - exports com.blazebit.persistence.impl.function.cast; - exports com.blazebit.persistence.impl.function.chr; - exports com.blazebit.persistence.impl.function.colldml; - exports com.blazebit.persistence.impl.function.coltrunc; - exports com.blazebit.persistence.impl.function.concat; - exports com.blazebit.persistence.impl.function.count; - exports com.blazebit.persistence.impl.function.countwrapper; - exports com.blazebit.persistence.impl.function.dateadd; - exports com.blazebit.persistence.impl.function.dateadd.day; - exports com.blazebit.persistence.impl.function.dateadd.hour; - exports com.blazebit.persistence.impl.function.dateadd.microseconds; - exports com.blazebit.persistence.impl.function.dateadd.milliseconds; - exports com.blazebit.persistence.impl.function.dateadd.minute; - exports com.blazebit.persistence.impl.function.dateadd.month; - exports com.blazebit.persistence.impl.function.dateadd.quarter; - exports com.blazebit.persistence.impl.function.dateadd.second; - exports com.blazebit.persistence.impl.function.dateadd.week; - exports com.blazebit.persistence.impl.function.dateadd.year; - exports com.blazebit.persistence.impl.function.datediff; - exports com.blazebit.persistence.impl.function.datediff.day; - exports com.blazebit.persistence.impl.function.datediff.hour; - exports com.blazebit.persistence.impl.function.datediff.microsecond; - exports com.blazebit.persistence.impl.function.datediff.millisecond; - exports com.blazebit.persistence.impl.function.datediff.minute; - exports com.blazebit.persistence.impl.function.datediff.month; - exports com.blazebit.persistence.impl.function.datediff.quarter; - exports com.blazebit.persistence.impl.function.datediff.second; - exports com.blazebit.persistence.impl.function.datediff.week; - exports com.blazebit.persistence.impl.function.datediff.year; - exports com.blazebit.persistence.impl.function.datetime.day; - exports com.blazebit.persistence.impl.function.datetime.dayofweek; - exports com.blazebit.persistence.impl.function.datetime.dayofyear; - exports com.blazebit.persistence.impl.function.datetime.epoch; - exports com.blazebit.persistence.impl.function.datetime.epochday; - exports com.blazebit.persistence.impl.function.datetime.epochmicro; - exports com.blazebit.persistence.impl.function.datetime.epochmilli; - exports com.blazebit.persistence.impl.function.datetime.hour; - exports com.blazebit.persistence.impl.function.datetime.isodayofweek; - exports com.blazebit.persistence.impl.function.datetime.isoweek; - exports com.blazebit.persistence.impl.function.datetime.microsecond; - exports com.blazebit.persistence.impl.function.datetime.millisecond; - exports com.blazebit.persistence.impl.function.datetime.minute; - exports com.blazebit.persistence.impl.function.datetime.month; - exports com.blazebit.persistence.impl.function.datetime.quarter; - exports com.blazebit.persistence.impl.function.datetime.second; - exports com.blazebit.persistence.impl.function.datetime.week; - exports com.blazebit.persistence.impl.function.datetime.year; - exports com.blazebit.persistence.impl.function.datetime.yearofweek; - exports com.blazebit.persistence.impl.function.datetime.yearweek; - exports com.blazebit.persistence.impl.function.entity; - exports com.blazebit.persistence.impl.function.every; - exports com.blazebit.persistence.impl.function.exist; - exports com.blazebit.persistence.impl.function.greatest; - exports com.blazebit.persistence.impl.function.groupconcat; - exports com.blazebit.persistence.impl.function.grouping; - exports com.blazebit.persistence.impl.function.groupingsets; - exports com.blazebit.persistence.impl.function.jsonget; - exports com.blazebit.persistence.impl.function.jsonset; - exports com.blazebit.persistence.impl.function.least; - exports com.blazebit.persistence.impl.function.limit; - exports com.blazebit.persistence.impl.function.literal; - exports com.blazebit.persistence.impl.function.nullfn; - exports com.blazebit.persistence.impl.function.nullsubquery; - exports com.blazebit.persistence.impl.function.oragg; - exports com.blazebit.persistence.impl.function.pageposition; - exports com.blazebit.persistence.impl.function.param; - exports com.blazebit.persistence.impl.function.querywrapper; - exports com.blazebit.persistence.impl.function.repeat; - exports com.blazebit.persistence.impl.function.replace; - exports com.blazebit.persistence.impl.function.rowvalue; - exports com.blazebit.persistence.impl.function.set; - exports com.blazebit.persistence.impl.function.stringjsonagg; - exports com.blazebit.persistence.impl.function.stringxmlagg; - exports com.blazebit.persistence.impl.function.subquery; - exports com.blazebit.persistence.impl.function.tomultiset; - exports com.blazebit.persistence.impl.function.tostringjson; - exports com.blazebit.persistence.impl.function.tostringxml; - exports com.blazebit.persistence.impl.function.treat; - exports com.blazebit.persistence.impl.function.trunc; - exports com.blazebit.persistence.impl.function.trunc.day; - exports com.blazebit.persistence.impl.function.trunc.hour; - exports com.blazebit.persistence.impl.function.trunc.microseconds; - exports com.blazebit.persistence.impl.function.trunc.milliseconds; - exports com.blazebit.persistence.impl.function.trunc.minute; - exports com.blazebit.persistence.impl.function.trunc.month; - exports com.blazebit.persistence.impl.function.trunc.quarter; - exports com.blazebit.persistence.impl.function.trunc.second; - exports com.blazebit.persistence.impl.function.trunc.week; - exports com.blazebit.persistence.impl.function.trunc.year; - exports com.blazebit.persistence.impl.function.window; - exports com.blazebit.persistence.impl.function.window.avg; - exports com.blazebit.persistence.impl.function.window.count; - exports com.blazebit.persistence.impl.function.window.cumedist; - exports com.blazebit.persistence.impl.function.window.denserank; - exports com.blazebit.persistence.impl.function.window.every; - exports com.blazebit.persistence.impl.function.window.first; - exports com.blazebit.persistence.impl.function.window.groupconcat; - exports com.blazebit.persistence.impl.function.window.lag; - exports com.blazebit.persistence.impl.function.window.last; - exports com.blazebit.persistence.impl.function.window.lead; - exports com.blazebit.persistence.impl.function.window.max; - exports com.blazebit.persistence.impl.function.window.min; - exports com.blazebit.persistence.impl.function.window.nth; - exports com.blazebit.persistence.impl.function.window.ntile; - exports com.blazebit.persistence.impl.function.window.oragg; - exports com.blazebit.persistence.impl.function.window.percentrank; - exports com.blazebit.persistence.impl.function.window.rank; - exports com.blazebit.persistence.impl.function.window.row; - exports com.blazebit.persistence.impl.function.window.sum; - exports com.blazebit.persistence.impl.keyset; - exports com.blazebit.persistence.impl.plan; - exports com.blazebit.persistence.impl.query; - exports com.blazebit.persistence.impl.transform; - exports com.blazebit.persistence.impl.util; - opens com.blazebit.persistence.impl.function.entity to org.hibernate.orm.core, eclipselink; - uses com.blazebit.persistence.spi.EntityManagerFactoryIntegrator; - uses com.blazebit.persistence.spi.ExtendedQuerySupport; - uses com.blazebit.persistence.spi.CriteriaBuilderConfigurationContributor; - provides com.blazebit.persistence.spi.CriteriaBuilderConfigurationProvider with com.blazebit.persistence.impl.CriteriaBuilderConfigurationProviderImpl; - } - - - - - - - - - - java9 - - [1.9,) - - - src/main/java9 - - - - - maven-antrun-plugin - - - compile-java9 - compile - - - - - - - - run - - - - - - maven-jar-plugin - true - - - - true - - - - - - default-jar - package - - jar - - - - - - - - - diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/AbstractCTECriteriaBuilder.java b/core/impl/src/main/java/com/blazebit/persistence/impl/AbstractCTECriteriaBuilder.java index df1d9fb073..82e946ba74 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/AbstractCTECriteriaBuilder.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/AbstractCTECriteriaBuilder.java @@ -18,8 +18,8 @@ import com.blazebit.persistence.spi.ExtendedManagedType; import com.blazebit.persistence.spi.SetOperationType; -import javax.persistence.Query; -import javax.persistence.metamodel.EntityType; +import jakarta.persistence.Query; +import jakarta.persistence.metamodel.EntityType; import java.util.Arrays; import java.util.Collections; import java.util.LinkedHashMap; diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/AbstractCommonQueryBuilder.java b/core/impl/src/main/java/com/blazebit/persistence/impl/AbstractCommonQueryBuilder.java index 6e50eab9c2..5344107781 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/AbstractCommonQueryBuilder.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/AbstractCommonQueryBuilder.java @@ -102,21 +102,21 @@ import com.blazebit.persistence.spi.SetOperationType; import com.blazebit.persistence.spi.ValuesStrategy; -import javax.persistence.EntityManager; -import javax.persistence.Parameter; -import javax.persistence.Query; -import javax.persistence.TemporalType; -import javax.persistence.Tuple; -import javax.persistence.TypedQuery; -import javax.persistence.criteria.ParameterExpression; -import javax.persistence.metamodel.Attribute; -import javax.persistence.metamodel.EntityType; -import javax.persistence.metamodel.IdentifiableType; -import javax.persistence.metamodel.ManagedType; -import javax.persistence.metamodel.MapAttribute; -import javax.persistence.metamodel.PluralAttribute; -import javax.persistence.metamodel.SingularAttribute; -import javax.persistence.metamodel.Type; +import jakarta.persistence.EntityManager; +import jakarta.persistence.Parameter; +import jakarta.persistence.Query; +import jakarta.persistence.TemporalType; +import jakarta.persistence.Tuple; +import jakarta.persistence.TypedQuery; +import jakarta.persistence.criteria.ParameterExpression; +import jakarta.persistence.metamodel.Attribute; +import jakarta.persistence.metamodel.EntityType; +import jakarta.persistence.metamodel.IdentifiableType; +import jakarta.persistence.metamodel.ManagedType; +import jakarta.persistence.metamodel.MapAttribute; +import jakarta.persistence.metamodel.PluralAttribute; +import jakarta.persistence.metamodel.SingularAttribute; +import jakarta.persistence.metamodel.Type; import java.io.Serializable; import java.util.ArrayList; import java.util.Arrays; @@ -3452,39 +3452,28 @@ protected List getCteNodes(boolean isSubquery) { String cteName = cteInfo.cteType.getName(); final List columnNames = cteInfo.columnNames; String head; - String[] aliases; - - if (mainQuery.dbmsDialect.supportsWithClauseHead()) { - sb.setLength(0); - sb.append(cteName); - sb.append('('); - for (int i = 0; i < columnNames.size(); i++) { - String column = columnNames.get(i); - if (i != 0) { - sb.append(", "); - } + sb.setLength(0); + sb.append(cteName); + sb.append('('); - sb.append(column); + for (int i = 0; i < columnNames.size(); i++) { + String column = columnNames.get(i); + if (i != 0) { + sb.append(", "); } - sb.append(')'); - head = sb.toString(); - aliases = null; - } else { - sb.setLength(0); - sb.append(cteName); - List list = new ArrayList<>(columnNames.size()); + sb.append(column); + } - for (int i = 0; i < columnNames.size(); i++) { - String[] columns = mainQuery.metamodel.getManagedType(ExtendedManagedType.class, cteInfo.cteType.getJavaType()).getAttribute(columnNames.get(i)).getColumnNames(); - for (String column : columns) { - list.add(column); - } - } + sb.append(')'); + head = sb.toString(); - head = sb.toString(); - aliases = list.toArray(new String[list.size()]); + String[] aliases; + if (mainQuery.dbmsDialect.supportsPaginationInWithClause() || !cteInfo.nonRecursiveCriteriaBuilder.hasLimit()) { + aliases = null; + } else { + aliases = columnNames.toArray(new String[0]); } String nonRecursiveWithClauseSuffix = null; diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/AbstractDeleteCollectionCriteriaBuilder.java b/core/impl/src/main/java/com/blazebit/persistence/impl/AbstractDeleteCollectionCriteriaBuilder.java index 4fbfbc5c44..6be5166da2 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/AbstractDeleteCollectionCriteriaBuilder.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/AbstractDeleteCollectionCriteriaBuilder.java @@ -27,13 +27,13 @@ import com.blazebit.persistence.spi.ExtendedQuerySupport; import com.blazebit.persistence.spi.JoinTable; -import javax.persistence.Query; -import javax.persistence.TypedQuery; -import javax.persistence.metamodel.EntityType; -import javax.persistence.metamodel.ManagedType; -import javax.persistence.metamodel.PluralAttribute; -import javax.persistence.metamodel.SingularAttribute; -import javax.persistence.metamodel.Type; +import jakarta.persistence.Query; +import jakarta.persistence.TypedQuery; +import jakarta.persistence.metamodel.EntityType; +import jakarta.persistence.metamodel.ManagedType; +import jakarta.persistence.metamodel.PluralAttribute; +import jakarta.persistence.metamodel.SingularAttribute; +import jakarta.persistence.metamodel.Type; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/AbstractFullQueryBuilder.java b/core/impl/src/main/java/com/blazebit/persistence/impl/AbstractFullQueryBuilder.java index 12d030e1c4..f3e75ecb7e 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/AbstractFullQueryBuilder.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/AbstractFullQueryBuilder.java @@ -45,12 +45,12 @@ import com.blazebit.persistence.spi.AttributeAccessor; import com.blazebit.persistence.spi.JpaMetamodelAccessor; -import javax.persistence.Parameter; -import javax.persistence.Query; -import javax.persistence.TypedQuery; -import javax.persistence.metamodel.Attribute; -import javax.persistence.metamodel.EmbeddableType; -import javax.persistence.metamodel.SingularAttribute; +import jakarta.persistence.Parameter; +import jakarta.persistence.Query; +import jakarta.persistence.TypedQuery; +import jakarta.persistence.metamodel.Attribute; +import jakarta.persistence.metamodel.EmbeddableType; +import jakarta.persistence.metamodel.SingularAttribute; import java.lang.reflect.Constructor; import java.util.ArrayList; import java.util.Arrays; diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/AbstractInsertCollectionCriteriaBuilder.java b/core/impl/src/main/java/com/blazebit/persistence/impl/AbstractInsertCollectionCriteriaBuilder.java index 79103fd9f1..31b4646472 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/AbstractInsertCollectionCriteriaBuilder.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/AbstractInsertCollectionCriteriaBuilder.java @@ -25,14 +25,14 @@ import com.blazebit.persistence.spi.JoinTable; import com.blazebit.persistence.spi.JpaMetamodelAccessor; -import javax.persistence.Query; -import javax.persistence.TypedQuery; -import javax.persistence.metamodel.Attribute; -import javax.persistence.metamodel.EntityType; -import javax.persistence.metamodel.ListAttribute; -import javax.persistence.metamodel.MapAttribute; -import javax.persistence.metamodel.SingularAttribute; -import javax.persistence.metamodel.Type; +import jakarta.persistence.Query; +import jakarta.persistence.TypedQuery; +import jakarta.persistence.metamodel.Attribute; +import jakarta.persistence.metamodel.EntityType; +import jakarta.persistence.metamodel.ListAttribute; +import jakarta.persistence.metamodel.MapAttribute; +import jakarta.persistence.metamodel.SingularAttribute; +import jakarta.persistence.metamodel.Type; import java.util.Collection; import java.util.Collections; import java.util.HashMap; diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/AbstractModificationCriteriaBuilder.java b/core/impl/src/main/java/com/blazebit/persistence/impl/AbstractModificationCriteriaBuilder.java index 7886726f29..27166ab1e3 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/AbstractModificationCriteriaBuilder.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/AbstractModificationCriteriaBuilder.java @@ -33,12 +33,12 @@ import com.blazebit.persistence.spi.JoinTable; import com.blazebit.persistence.spi.JpaMetamodelAccessor; -import javax.persistence.Query; -import javax.persistence.Tuple; -import javax.persistence.TypedQuery; -import javax.persistence.metamodel.Attribute; -import javax.persistence.metamodel.EntityType; -import javax.persistence.metamodel.SingularAttribute; +import jakarta.persistence.Query; +import jakarta.persistence.Tuple; +import jakarta.persistence.TypedQuery; +import jakarta.persistence.metamodel.Attribute; +import jakarta.persistence.metamodel.EntityType; +import jakarta.persistence.metamodel.SingularAttribute; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/AbstractQueryBuilder.java b/core/impl/src/main/java/com/blazebit/persistence/impl/AbstractQueryBuilder.java index 6e3fcae8ce..d056c6cd7d 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/AbstractQueryBuilder.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/AbstractQueryBuilder.java @@ -8,7 +8,7 @@ import java.util.List; import java.util.stream.Stream; -import javax.persistence.TypedQuery; +import jakarta.persistence.TypedQuery; import com.blazebit.persistence.FullQueryBuilder; import com.blazebit.persistence.Queryable; diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/AbstractUpdateCollectionCriteriaBuilder.java b/core/impl/src/main/java/com/blazebit/persistence/impl/AbstractUpdateCollectionCriteriaBuilder.java index ce9a542190..c4e80c8a5a 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/AbstractUpdateCollectionCriteriaBuilder.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/AbstractUpdateCollectionCriteriaBuilder.java @@ -27,16 +27,16 @@ import com.blazebit.persistence.spi.JoinTable; import com.blazebit.persistence.spi.UpdateJoinStyle; -import javax.persistence.Query; -import javax.persistence.TypedQuery; -import javax.persistence.metamodel.Attribute; -import javax.persistence.metamodel.EntityType; -import javax.persistence.metamodel.ListAttribute; -import javax.persistence.metamodel.ManagedType; -import javax.persistence.metamodel.MapAttribute; -import javax.persistence.metamodel.PluralAttribute; -import javax.persistence.metamodel.SingularAttribute; -import javax.persistence.metamodel.Type; +import jakarta.persistence.Query; +import jakarta.persistence.TypedQuery; +import jakarta.persistence.metamodel.Attribute; +import jakarta.persistence.metamodel.EntityType; +import jakarta.persistence.metamodel.ListAttribute; +import jakarta.persistence.metamodel.ManagedType; +import jakarta.persistence.metamodel.MapAttribute; +import jakarta.persistence.metamodel.PluralAttribute; +import jakarta.persistence.metamodel.SingularAttribute; +import jakarta.persistence.metamodel.Type; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; @@ -305,7 +305,7 @@ protected void prepareAndCheck(JoinVisitor parentVisitor) { if (!needsCheck) { return; } - boolean enableElementCollectionIdCutoff = collectionAttribute.getJoinTable() != null && !mainQuery.jpaProvider.needsAssociationToIdRewriteInOnClause(); + boolean enableElementCollectionIdCutoff = collectionAttribute.getJoinTable() != null; JpaUtils.expandBindings(setAttributeBindingMap, collectionColumnBindingMap, collectionAttributeEntries, ClauseType.SET, this, keyFunctionExpression, enableElementCollectionIdCutoff); super.prepareAndCheck(parentVisitor); } diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/AssociationFromIdParameterTransformer.java b/core/impl/src/main/java/com/blazebit/persistence/impl/AssociationFromIdParameterTransformer.java index 09337846a9..9017f850d9 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/AssociationFromIdParameterTransformer.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/AssociationFromIdParameterTransformer.java @@ -7,8 +7,8 @@ import com.blazebit.reflection.ReflectionUtils; -import javax.persistence.Query; -import javax.persistence.metamodel.Attribute; +import jakarta.persistence.Query; +import jakarta.persistence.metamodel.Attribute; import java.lang.reflect.Constructor; import java.lang.reflect.Field; import java.lang.reflect.Member; diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/AssociationToIdParameterTransformer.java b/core/impl/src/main/java/com/blazebit/persistence/impl/AssociationToIdParameterTransformer.java index 9f7c6f2633..41a2a7e952 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/AssociationToIdParameterTransformer.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/AssociationToIdParameterTransformer.java @@ -7,7 +7,7 @@ import com.blazebit.persistence.spi.JpaProvider; -import javax.persistence.Query; +import jakarta.persistence.Query; /** * @author Christian Beikov diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/AttributeHolder.java b/core/impl/src/main/java/com/blazebit/persistence/impl/AttributeHolder.java index 24385fd33f..4fddb5968b 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/AttributeHolder.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/AttributeHolder.java @@ -5,8 +5,8 @@ package com.blazebit.persistence.impl; -import javax.persistence.metamodel.Attribute; -import javax.persistence.metamodel.Type; +import jakarta.persistence.metamodel.Attribute; +import jakarta.persistence.metamodel.Type; /** * diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/BaseDeleteCriteriaBuilderImpl.java b/core/impl/src/main/java/com/blazebit/persistence/impl/BaseDeleteCriteriaBuilderImpl.java index afc93b4efe..bf3828ba53 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/BaseDeleteCriteriaBuilderImpl.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/BaseDeleteCriteriaBuilderImpl.java @@ -24,8 +24,8 @@ import com.blazebit.persistence.spi.ExtendedManagedType; import com.blazebit.persistence.spi.ExtendedQuerySupport; -import javax.persistence.Query; -import javax.persistence.TypedQuery; +import jakarta.persistence.Query; +import jakarta.persistence.TypedQuery; import java.util.ArrayList; import java.util.Collections; import java.util.List; diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/BaseFinalSetOperationBuilderImpl.java b/core/impl/src/main/java/com/blazebit/persistence/impl/BaseFinalSetOperationBuilderImpl.java index 346b1dd330..1811448d80 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/BaseFinalSetOperationBuilderImpl.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/BaseFinalSetOperationBuilderImpl.java @@ -30,8 +30,8 @@ import com.blazebit.persistence.spi.OrderByElement; import com.blazebit.persistence.spi.SetOperationType; -import javax.persistence.Query; -import javax.persistence.TypedQuery; +import jakarta.persistence.Query; +import jakarta.persistence.TypedQuery; import java.util.ArrayList; import java.util.Collections; import java.util.HashSet; @@ -442,6 +442,9 @@ protected TypedQuery getTypedQuery(StringBuilder lateralSb, JoinNode lateralJ @Override protected boolean needsSqlReplacement(Set keyRestrictedLeftJoins) { + if (isMainQuery && mainQuery.cteManager.hasCtes()) { + return true; + } if (setOperationManager.getStartQueryBuilder().needsSqlReplacement(setOperationManager.getStartQueryBuilder().getKeyRestrictedLeftJoins())) { return true; } diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/BaseFinalSetOperationSubqueryBuilderImpl.java b/core/impl/src/main/java/com/blazebit/persistence/impl/BaseFinalSetOperationSubqueryBuilderImpl.java index c54f85ec90..982025fd42 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/BaseFinalSetOperationSubqueryBuilderImpl.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/BaseFinalSetOperationSubqueryBuilderImpl.java @@ -10,7 +10,7 @@ import java.util.Map; import java.util.Set; -import javax.persistence.Tuple; +import jakarta.persistence.Tuple; import com.blazebit.persistence.BaseFinalSetOperationBuilder; import com.blazebit.persistence.BaseOngoingFinalSetOperationBuilder; diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/BaseInsertCriteriaBuilderImpl.java b/core/impl/src/main/java/com/blazebit/persistence/impl/BaseInsertCriteriaBuilderImpl.java index 826d635b53..259202f40e 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/BaseInsertCriteriaBuilderImpl.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/BaseInsertCriteriaBuilderImpl.java @@ -12,7 +12,7 @@ import java.util.Set; import java.util.TreeMap; -import javax.persistence.Query; +import jakarta.persistence.Query; import com.blazebit.persistence.BaseInsertCriteriaBuilder; import com.blazebit.persistence.ReturningBuilder; diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/BaseSubqueryBuilderImpl.java b/core/impl/src/main/java/com/blazebit/persistence/impl/BaseSubqueryBuilderImpl.java index 8797b9a1bb..60ef008dbf 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/BaseSubqueryBuilderImpl.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/BaseSubqueryBuilderImpl.java @@ -13,7 +13,7 @@ import com.blazebit.persistence.spi.JpqlFunctionProcessor; import com.blazebit.persistence.spi.SetOperationType; -import javax.persistence.Tuple; +import jakarta.persistence.Tuple; import java.util.ArrayList; import java.util.List; import java.util.Map; diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/BaseUpdateCriteriaBuilderImpl.java b/core/impl/src/main/java/com/blazebit/persistence/impl/BaseUpdateCriteriaBuilderImpl.java index 974e6d83a0..8dfac5620a 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/BaseUpdateCriteriaBuilderImpl.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/BaseUpdateCriteriaBuilderImpl.java @@ -35,11 +35,11 @@ import com.blazebit.persistence.spi.JpaMetamodelAccessor; import com.blazebit.persistence.spi.UpdateJoinStyle; -import javax.persistence.Query; -import javax.persistence.TypedQuery; -import javax.persistence.metamodel.Attribute; -import javax.persistence.metamodel.EntityType; -import javax.persistence.metamodel.SingularAttribute; +import jakarta.persistence.Query; +import jakarta.persistence.TypedQuery; +import jakarta.persistence.metamodel.Attribute; +import jakarta.persistence.metamodel.EntityType; +import jakarta.persistence.metamodel.SingularAttribute; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/CTEInfo.java b/core/impl/src/main/java/com/blazebit/persistence/impl/CTEInfo.java index 1f7658355f..59eeb35141 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/CTEInfo.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/CTEInfo.java @@ -7,7 +7,7 @@ import com.blazebit.persistence.parser.expression.ExpressionCopyContext; -import javax.persistence.metamodel.EntityType; +import jakarta.persistence.metamodel.EntityType; import java.util.List; import java.util.Map; diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/CTEManager.java b/core/impl/src/main/java/com/blazebit/persistence/impl/CTEManager.java index 4acf6dccb8..353ae5328a 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/CTEManager.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/CTEManager.java @@ -13,7 +13,7 @@ import com.blazebit.persistence.parser.expression.ExpressionCopyContext; import com.blazebit.persistence.parser.util.JpaMetamodelUtils; -import javax.persistence.metamodel.EntityType; +import jakarta.persistence.metamodel.EntityType; import java.util.Collection; import java.util.Collections; import java.util.IdentityHashMap; diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/CachingJpaProvider.java b/core/impl/src/main/java/com/blazebit/persistence/impl/CachingJpaProvider.java index 2c1e9c0e54..b5055ab0cf 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/CachingJpaProvider.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/CachingJpaProvider.java @@ -12,10 +12,10 @@ import com.blazebit.persistence.spi.JpaMetamodelAccessor; import com.blazebit.persistence.spi.JpaProvider; -import javax.persistence.EntityManager; -import javax.persistence.Query; -import javax.persistence.metamodel.EntityType; -import javax.persistence.metamodel.ManagedType; +import jakarta.persistence.EntityManager; +import jakarta.persistence.Query; +import jakarta.persistence.metamodel.EntityType; +import jakarta.persistence.metamodel.ManagedType; import java.util.List; import java.util.Map; @@ -333,11 +333,6 @@ public boolean supportsTransientEntityAsParameter() { return jpaProvider.supportsTransientEntityAsParameter(); } - @Override - public boolean needsAssociationToIdRewriteInOnClause() { - return jpaProvider.needsAssociationToIdRewriteInOnClause(); - } - @Override public boolean needsBrokenAssociationToIdRewriteInOnClause() { return jpaProvider.needsBrokenAssociationToIdRewriteInOnClause(); diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/CallerChecker.java b/core/impl/src/main/java/com/blazebit/persistence/impl/CallerChecker.java index 1cfc708218..d1214d0199 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/CallerChecker.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/CallerChecker.java @@ -5,6 +5,8 @@ package com.blazebit.persistence.impl; +import java.util.Set; + /** * A contract that checks if the caller of our caller is trusted. On Java 9 this will actually check modules. * @@ -17,6 +19,8 @@ private CallerChecker() { } public static boolean isCallerTrusted() { - return true; + return StackWalker.getInstance(Set.of(), 2).walk(stackFrames -> { + return stackFrames.limit(2).allMatch(s -> s.getClassName().startsWith("com.blazebit.persistence.")); + }); } } diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/CommonQueryBuilderAdapter.java b/core/impl/src/main/java/com/blazebit/persistence/impl/CommonQueryBuilderAdapter.java index 05e212cbc5..7bbd6ab17e 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/CommonQueryBuilderAdapter.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/CommonQueryBuilderAdapter.java @@ -10,9 +10,9 @@ import java.util.Map; import java.util.Set; -import javax.persistence.Parameter; -import javax.persistence.TemporalType; -import javax.persistence.criteria.ParameterExpression; +import jakarta.persistence.Parameter; +import jakarta.persistence.TemporalType; +import jakarta.persistence.criteria.ParameterExpression; import com.blazebit.persistence.CommonQueryBuilder; import com.blazebit.persistence.CriteriaBuilderFactory; diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/ConstantifiedJoinNodeAttributeCollector.java b/core/impl/src/main/java/com/blazebit/persistence/impl/ConstantifiedJoinNodeAttributeCollector.java index 65ae08eb6a..f489df9264 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/ConstantifiedJoinNodeAttributeCollector.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/ConstantifiedJoinNodeAttributeCollector.java @@ -44,11 +44,11 @@ import com.blazebit.persistence.spi.ExtendedAttribute; import com.blazebit.persistence.spi.ExtendedManagedType; -import javax.persistence.metamodel.Attribute; -import javax.persistence.metamodel.EmbeddableType; -import javax.persistence.metamodel.ManagedType; -import javax.persistence.metamodel.PluralAttribute; -import javax.persistence.metamodel.SingularAttribute; +import jakarta.persistence.metamodel.Attribute; +import jakarta.persistence.metamodel.EmbeddableType; +import jakarta.persistence.metamodel.ManagedType; +import jakarta.persistence.metamodel.PluralAttribute; +import jakarta.persistence.metamodel.SingularAttribute; import java.util.AbstractMap; import java.util.Collections; import java.util.HashMap; diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/CriteriaBuilderConfigurationImpl.java b/core/impl/src/main/java/com/blazebit/persistence/impl/CriteriaBuilderConfigurationImpl.java index 9b47c2d05d..bce4cad3dd 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/CriteriaBuilderConfigurationImpl.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/CriteriaBuilderConfigurationImpl.java @@ -548,7 +548,7 @@ import java.util.ServiceLoader; import java.util.Set; import java.util.TimeZone; -import javax.persistence.EntityManagerFactory; +import jakarta.persistence.EntityManagerFactory; /** * @@ -1671,7 +1671,8 @@ private void loadInternalFunctions() { // null subquery function jpqlFunctionGroup = new JpqlFunctionGroup(NullSubqueryFunction.FUNCTION_NAME, false); - jpqlFunctionGroup.add(null, new NullSubqueryFunction()); + jpqlFunctionGroup.add(null, new NullSubqueryFunction(null)); + jpqlFunctionGroup.add("oracle", new NullSubqueryFunction(" from dual")); registerFunction(jpqlFunctionGroup); // subquery diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/CriteriaBuilderFactoryImpl.java b/core/impl/src/main/java/com/blazebit/persistence/impl/CriteriaBuilderFactoryImpl.java index ff88455d85..0988c7fd47 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/CriteriaBuilderFactoryImpl.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/CriteriaBuilderFactoryImpl.java @@ -30,9 +30,9 @@ import com.blazebit.persistence.spi.JpqlFunctionKind; import com.blazebit.persistence.spi.PackageOpener; -import javax.persistence.EntityManager; -import javax.persistence.EntityManagerFactory; -import javax.persistence.metamodel.Metamodel; +import jakarta.persistence.EntityManager; +import jakarta.persistence.EntityManagerFactory; +import jakarta.persistence.metamodel.Metamodel; import java.util.Collections; import java.util.HashMap; import java.util.List; diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/CriteriaBuilderImpl.java b/core/impl/src/main/java/com/blazebit/persistence/impl/CriteriaBuilderImpl.java index 081f89ffbb..94d7ae208e 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/CriteriaBuilderImpl.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/CriteriaBuilderImpl.java @@ -13,7 +13,7 @@ import com.blazebit.persistence.StartOngoingSetOperationCriteriaBuilder; import com.blazebit.persistence.spi.SetOperationType; -import javax.persistence.TypedQuery; +import jakarta.persistence.TypedQuery; /** * diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/EmbeddableSplittingVisitor.java b/core/impl/src/main/java/com/blazebit/persistence/impl/EmbeddableSplittingVisitor.java index c0be23bcbb..de901edf4a 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/EmbeddableSplittingVisitor.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/EmbeddableSplittingVisitor.java @@ -37,14 +37,14 @@ import com.blazebit.persistence.spi.ExtendedManagedType; import com.blazebit.persistence.spi.JpaProvider; -import javax.persistence.metamodel.Attribute; -import javax.persistence.metamodel.EmbeddableType; -import javax.persistence.metamodel.EntityType; -import javax.persistence.metamodel.ManagedType; -import javax.persistence.metamodel.MapAttribute; -import javax.persistence.metamodel.PluralAttribute; -import javax.persistence.metamodel.SingularAttribute; -import javax.persistence.metamodel.Type; +import jakarta.persistence.metamodel.Attribute; +import jakarta.persistence.metamodel.EmbeddableType; +import jakarta.persistence.metamodel.EntityType; +import jakarta.persistence.metamodel.ManagedType; +import jakarta.persistence.metamodel.MapAttribute; +import jakarta.persistence.metamodel.PluralAttribute; +import jakarta.persistence.metamodel.SingularAttribute; +import jakarta.persistence.metamodel.Type; import java.util.ArrayList; import java.util.Collection; import java.util.List; diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/EntityMetamodelImpl.java b/core/impl/src/main/java/com/blazebit/persistence/impl/EntityMetamodelImpl.java index 295c559b7b..45ff186893 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/EntityMetamodelImpl.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/EntityMetamodelImpl.java @@ -18,19 +18,19 @@ import com.blazebit.persistence.spi.JpaProviderFactory; import com.blazebit.reflection.ReflectionUtils; -import javax.persistence.EntityManager; -import javax.persistence.EntityManagerFactory; -import javax.persistence.metamodel.Attribute; -import javax.persistence.metamodel.BasicType; -import javax.persistence.metamodel.EmbeddableType; -import javax.persistence.metamodel.EntityType; -import javax.persistence.metamodel.IdentifiableType; -import javax.persistence.metamodel.ManagedType; -import javax.persistence.metamodel.MapAttribute; -import javax.persistence.metamodel.Metamodel; -import javax.persistence.metamodel.PluralAttribute; -import javax.persistence.metamodel.SingularAttribute; -import javax.persistence.metamodel.Type; +import jakarta.persistence.EntityManager; +import jakarta.persistence.EntityManagerFactory; +import jakarta.persistence.metamodel.Attribute; +import jakarta.persistence.metamodel.BasicType; +import jakarta.persistence.metamodel.EmbeddableType; +import jakarta.persistence.metamodel.EntityType; +import jakarta.persistence.metamodel.IdentifiableType; +import jakarta.persistence.metamodel.ManagedType; +import jakarta.persistence.metamodel.MapAttribute; +import jakarta.persistence.metamodel.Metamodel; +import jakarta.persistence.metamodel.PluralAttribute; +import jakarta.persistence.metamodel.SingularAttribute; +import jakarta.persistence.metamodel.Type; import java.lang.reflect.Field; import java.lang.reflect.Method; import java.util.AbstractMap; diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/EntitySelectResolveVisitor.java b/core/impl/src/main/java/com/blazebit/persistence/impl/EntitySelectResolveVisitor.java index 359af758a6..0b630d7144 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/EntitySelectResolveVisitor.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/EntitySelectResolveVisitor.java @@ -20,9 +20,9 @@ import com.blazebit.persistence.spi.ExtendedManagedType; import com.blazebit.persistence.spi.JpaProvider; -import javax.persistence.FetchType; -import javax.persistence.metamodel.Attribute; -import javax.persistence.metamodel.EntityType; +import jakarta.persistence.FetchType; +import jakarta.persistence.metamodel.Attribute; +import jakarta.persistence.metamodel.EntityType; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/ExpressionUtils.java b/core/impl/src/main/java/com/blazebit/persistence/impl/ExpressionUtils.java index 8a069a1143..cc64b0e6b7 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/ExpressionUtils.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/ExpressionUtils.java @@ -37,17 +37,17 @@ import com.blazebit.persistence.spi.ExtendedAttribute; import com.blazebit.persistence.spi.ExtendedManagedType; -import javax.persistence.Basic; -import javax.persistence.ElementCollection; -import javax.persistence.FetchType; -import javax.persistence.ManyToMany; -import javax.persistence.ManyToOne; -import javax.persistence.OneToMany; -import javax.persistence.OneToOne; -import javax.persistence.metamodel.Attribute; -import javax.persistence.metamodel.ManagedType; -import javax.persistence.metamodel.SingularAttribute; -import javax.persistence.metamodel.Type; +import jakarta.persistence.Basic; +import jakarta.persistence.ElementCollection; +import jakarta.persistence.FetchType; +import jakarta.persistence.ManyToMany; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.OneToMany; +import jakarta.persistence.OneToOne; +import jakarta.persistence.metamodel.Attribute; +import jakarta.persistence.metamodel.ManagedType; +import jakarta.persistence.metamodel.SingularAttribute; +import jakarta.persistence.metamodel.Type; import java.lang.annotation.Annotation; import java.lang.reflect.Field; import java.lang.reflect.Member; diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/ExtendedParameter.java b/core/impl/src/main/java/com/blazebit/persistence/impl/ExtendedParameter.java index 8c61b60a0d..a8bd632bb1 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/ExtendedParameter.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/ExtendedParameter.java @@ -5,7 +5,7 @@ package com.blazebit.persistence.impl; -import javax.persistence.Parameter; +import jakarta.persistence.Parameter; /** * @author Christian Beikov diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/FunctionalDependencyAnalyzerVisitor.java b/core/impl/src/main/java/com/blazebit/persistence/impl/FunctionalDependencyAnalyzerVisitor.java index 7258ed8ea4..e46992380b 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/FunctionalDependencyAnalyzerVisitor.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/FunctionalDependencyAnalyzerVisitor.java @@ -38,13 +38,13 @@ import com.blazebit.persistence.spi.ExtendedManagedType; import com.blazebit.persistence.spi.JpaProvider; -import javax.persistence.metamodel.Attribute; -import javax.persistence.metamodel.EmbeddableType; -import javax.persistence.metamodel.EntityType; -import javax.persistence.metamodel.ManagedType; -import javax.persistence.metamodel.PluralAttribute; -import javax.persistence.metamodel.SingularAttribute; -import javax.persistence.metamodel.Type; +import jakarta.persistence.metamodel.Attribute; +import jakarta.persistence.metamodel.EmbeddableType; +import jakarta.persistence.metamodel.EntityType; +import jakarta.persistence.metamodel.ManagedType; +import jakarta.persistence.metamodel.PluralAttribute; +import jakarta.persistence.metamodel.SingularAttribute; +import jakarta.persistence.metamodel.Type; import java.util.AbstractMap; import java.util.ArrayList; import java.util.Collections; diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/JoinManager.java b/core/impl/src/main/java/com/blazebit/persistence/impl/JoinManager.java index 7593ced05b..376691468d 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/JoinManager.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/JoinManager.java @@ -65,16 +65,16 @@ import com.blazebit.persistence.spi.JpaMetamodelAccessor; import com.blazebit.persistence.spi.JpaProvider; -import javax.persistence.metamodel.Attribute; -import javax.persistence.metamodel.EmbeddableType; -import javax.persistence.metamodel.EntityType; -import javax.persistence.metamodel.IdentifiableType; -import javax.persistence.metamodel.ListAttribute; -import javax.persistence.metamodel.ManagedType; -import javax.persistence.metamodel.MapAttribute; -import javax.persistence.metamodel.PluralAttribute; -import javax.persistence.metamodel.SingularAttribute; -import javax.persistence.metamodel.Type; +import jakarta.persistence.metamodel.Attribute; +import jakarta.persistence.metamodel.EmbeddableType; +import jakarta.persistence.metamodel.EntityType; +import jakarta.persistence.metamodel.IdentifiableType; +import jakarta.persistence.metamodel.ListAttribute; +import jakarta.persistence.metamodel.ManagedType; +import jakarta.persistence.metamodel.MapAttribute; +import jakarta.persistence.metamodel.PluralAttribute; +import jakarta.persistence.metamodel.SingularAttribute; +import jakarta.persistence.metamodel.Type; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; @@ -2271,7 +2271,16 @@ private void addDefaultJoinsAndRenderJoinNode(StringBuilder sb, JoinAliasInfo jo if (!renderReverseDependency(sb, node, aliasPrefix, renderFetches, nodesToFetch, whereConjuncts, placeholderRequiringNodes, externalRepresentation, lateralExample)) { // If we couldn't render the join node because one of it's parents or dependencies parents isn't rendered yet, we defer the rendering renderedJoins.remove(node); - stack.add(Math.max(0, stack.size() - 1), node); + int insertionIndex = Math.max( 0, stack.size() - 1 ); + for (int i = insertionIndex; i < stack.size(); i++) { + JoinNode stackNode = stack.get(i); + if (stackNode.isRootJoinNode()) { + // Mark other root join nodes that will be rendered before this node as cross joins, + // to retain the visibility of the aliases used in the ON clause + stackNode.setCrossJoin(); + } + } + stack.add(insertionIndex, node); return; } } diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/JoinNode.java b/core/impl/src/main/java/com/blazebit/persistence/impl/JoinNode.java index d97085bb0a..098a153857 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/JoinNode.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/JoinNode.java @@ -27,11 +27,11 @@ import com.blazebit.persistence.parser.predicate.Predicate; import com.blazebit.persistence.parser.util.JpaMetamodelUtils; -import javax.persistence.metamodel.Attribute; -import javax.persistence.metamodel.EntityType; -import javax.persistence.metamodel.IdentifiableType; -import javax.persistence.metamodel.ManagedType; -import javax.persistence.metamodel.Type; +import jakarta.persistence.metamodel.Attribute; +import jakarta.persistence.metamodel.EntityType; +import jakarta.persistence.metamodel.IdentifiableType; +import jakarta.persistence.metamodel.ManagedType; +import jakarta.persistence.metamodel.Type; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/JoinTreeNode.java b/core/impl/src/main/java/com/blazebit/persistence/impl/JoinTreeNode.java index 80d448c5f6..37ae9f5b41 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/JoinTreeNode.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/JoinTreeNode.java @@ -10,7 +10,7 @@ import java.util.NavigableMap; import java.util.TreeMap; -import javax.persistence.metamodel.Attribute; +import jakarta.persistence.metamodel.Attribute; /** * diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/JoinVisitor.java b/core/impl/src/main/java/com/blazebit/persistence/impl/JoinVisitor.java index 8e8e2ef858..5ab5ce2a7a 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/JoinVisitor.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/JoinVisitor.java @@ -32,9 +32,9 @@ import com.blazebit.persistence.parser.util.ExpressionUtils; import com.blazebit.persistence.spi.ExtendedManagedType; -import javax.persistence.metamodel.EntityType; -import javax.persistence.metamodel.ManagedType; -import javax.persistence.metamodel.Type; +import jakarta.persistence.metamodel.EntityType; +import jakarta.persistence.metamodel.ManagedType; +import jakarta.persistence.metamodel.Type; import java.util.ArrayList; import java.util.Collection; import java.util.HashSet; diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/JpaUtils.java b/core/impl/src/main/java/com/blazebit/persistence/impl/JpaUtils.java index 206e51fcc4..3e79377f0a 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/JpaUtils.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/JpaUtils.java @@ -29,13 +29,13 @@ import com.blazebit.persistence.spi.JpaMetamodelAccessor; import com.blazebit.persistence.spi.JpaProvider; -import javax.persistence.metamodel.Attribute; -import javax.persistence.metamodel.EntityType; -import javax.persistence.metamodel.ListAttribute; -import javax.persistence.metamodel.ManagedType; -import javax.persistence.metamodel.MapAttribute; -import javax.persistence.metamodel.PluralAttribute; -import javax.persistence.metamodel.Type; +import jakarta.persistence.metamodel.Attribute; +import jakarta.persistence.metamodel.EntityType; +import jakarta.persistence.metamodel.ListAttribute; +import jakarta.persistence.metamodel.ManagedType; +import jakarta.persistence.metamodel.MapAttribute; +import jakarta.persistence.metamodel.PluralAttribute; +import jakarta.persistence.metamodel.Type; import java.util.ArrayDeque; import java.util.ArrayList; import java.util.Arrays; diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/LeafOngoingSetOperationSubqueryBuilderImpl.java b/core/impl/src/main/java/com/blazebit/persistence/impl/LeafOngoingSetOperationSubqueryBuilderImpl.java index 0ab8520536..b5f954d7e8 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/LeafOngoingSetOperationSubqueryBuilderImpl.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/LeafOngoingSetOperationSubqueryBuilderImpl.java @@ -13,7 +13,7 @@ import com.blazebit.persistence.parser.expression.ExpressionFactory; import com.blazebit.persistence.spi.SetOperationType; -import javax.persistence.Tuple; +import jakarta.persistence.Tuple; import java.util.Map; /** diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/MainQuery.java b/core/impl/src/main/java/com/blazebit/persistence/impl/MainQuery.java index 2ded406e35..0e9dc918ee 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/MainQuery.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/MainQuery.java @@ -12,7 +12,7 @@ import com.blazebit.persistence.spi.JpqlFunction; import com.blazebit.persistence.spi.JpqlMacro; -import javax.persistence.EntityManager; +import jakarta.persistence.EntityManager; import java.util.Map; /** diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/ManagedEntityAssociationParameterTransformerFactory.java b/core/impl/src/main/java/com/blazebit/persistence/impl/ManagedEntityAssociationParameterTransformerFactory.java index 931987abd5..7a7ebec133 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/ManagedEntityAssociationParameterTransformerFactory.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/ManagedEntityAssociationParameterTransformerFactory.java @@ -5,8 +5,8 @@ package com.blazebit.persistence.impl; -import javax.persistence.EntityManager; -import javax.persistence.Query; +import jakarta.persistence.EntityManager; +import jakarta.persistence.Query; /** * @author Christian Beikov diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/OngoingSetOperationSubqueryBuilderImpl.java b/core/impl/src/main/java/com/blazebit/persistence/impl/OngoingSetOperationSubqueryBuilderImpl.java index 9bb5b8fba9..f91cf9145a 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/OngoingSetOperationSubqueryBuilderImpl.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/OngoingSetOperationSubqueryBuilderImpl.java @@ -13,7 +13,7 @@ import com.blazebit.persistence.parser.expression.ExpressionFactory; import com.blazebit.persistence.spi.SetOperationType; -import javax.persistence.Tuple; +import jakarta.persistence.Tuple; import java.util.Map; /** diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/PaginatedCriteriaBuilderImpl.java b/core/impl/src/main/java/com/blazebit/persistence/impl/PaginatedCriteriaBuilderImpl.java index 7687260fc1..714c6e1655 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/PaginatedCriteriaBuilderImpl.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/PaginatedCriteriaBuilderImpl.java @@ -55,8 +55,8 @@ import com.blazebit.persistence.parser.predicate.Predicate; import com.blazebit.persistence.spi.AttributeAccessor; -import javax.persistence.Parameter; -import javax.persistence.TypedQuery; +import jakarta.persistence.Parameter; +import jakarta.persistence.TypedQuery; import java.util.AbstractMap; import java.util.ArrayList; import java.util.Arrays; @@ -999,9 +999,15 @@ private Map.Entry, ObjectBuilder> getObjectQuery(boolean normal return new AbstractMap.SimpleEntry, ObjectBuilder>(query, objectBuilder); } - private TypedQuery getIdQuery(String idQueryString, boolean normalQueryMode, Set keyRestrictedLeftJoins, List entityFunctions) { + private TypedQuery getIdQuery(String idQueryString, boolean normalQueryMode, Set keyRestrictedLeftJoins, List entityFunctions) { + Class resultType; + if (needsNewIdList || withInlineCountQuery) { + resultType = Object[].class; + } else { + resultType = Object.class; + } if (normalQueryMode && isEmpty(keyRestrictedLeftJoins, ID_QUERY_CLAUSE_EXCLUSIONS)) { - TypedQuery idQuery = em.createQuery(idQueryString, Object[].class); + TypedQuery idQuery = em.createQuery(idQueryString, resultType); if (isCacheable()) { mainQuery.jpaProvider.setCacheable(idQuery); } @@ -1014,7 +1020,7 @@ private TypedQuery getIdQuery(String idQueryString, boolean normalQuer return parameterManager.getCriteriaNameMapping() == null ? idQuery : new TypedQueryWrapper<>(idQuery, parameterManager.getCriteriaNameMapping()); } - TypedQuery baseQuery = em.createQuery(idQueryString, Object[].class); + TypedQuery baseQuery = em.createQuery(idQueryString, resultType); Set parameterListNames = parameterManager.getParameterListNames(baseQuery); List keyRestrictedLeftJoinAliases = getKeyRestrictedLeftJoinAliases(baseQuery, keyRestrictedLeftJoins, ID_QUERY_CLAUSE_EXCLUSIONS); @@ -1026,7 +1032,7 @@ private TypedQuery getIdQuery(String idQueryString, boolean normalQuer mainQuery.cteManager.isRecursive(), ctes, shouldRenderCteNodes, mainQuery.getQueryConfiguration().isQueryPlanCacheEnabled(), null ); - CustomSQLTypedQuery idQuery = new CustomSQLTypedQuery( + CustomSQLTypedQuery idQuery = new CustomSQLTypedQuery<>( querySpecification, baseQuery, parameterManager.getCriteriaNameMapping(), diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/PaginatedTypedQueryImpl.java b/core/impl/src/main/java/com/blazebit/persistence/impl/PaginatedTypedQueryImpl.java index fef09c3104..1efe0a64b2 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/PaginatedTypedQueryImpl.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/PaginatedTypedQueryImpl.java @@ -17,16 +17,16 @@ import com.blazebit.persistence.impl.keyset.KeysetPaginationHelper; import com.blazebit.persistence.impl.util.SetView; -import javax.persistence.FlushModeType; -import javax.persistence.LockModeType; -import javax.persistence.NoResultException; -import javax.persistence.NonUniqueResultException; -import javax.persistence.Parameter; -import javax.persistence.PersistenceException; -import javax.persistence.Query; -import javax.persistence.TemporalType; -import javax.persistence.TypedQuery; -import javax.persistence.criteria.ParameterExpression; +import jakarta.persistence.FlushModeType; +import jakarta.persistence.LockModeType; +import jakarta.persistence.NoResultException; +import jakarta.persistence.NonUniqueResultException; +import jakarta.persistence.Parameter; +import jakarta.persistence.PersistenceException; +import jakarta.persistence.Query; +import jakarta.persistence.TemporalType; +import jakarta.persistence.TypedQuery; +import jakarta.persistence.criteria.ParameterExpression; import java.io.Serializable; import java.util.ArrayList; import java.util.Arrays; diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/ParameterManager.java b/core/impl/src/main/java/com/blazebit/persistence/impl/ParameterManager.java index c7d60ee7bf..2b9cf058ce 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/ParameterManager.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/ParameterManager.java @@ -14,9 +14,9 @@ import com.blazebit.persistence.spi.AttributeAccessor; import com.blazebit.persistence.spi.JpaProvider; -import javax.persistence.Parameter; -import javax.persistence.Query; -import javax.persistence.TemporalType; +import jakarta.persistence.Parameter; +import jakarta.persistence.Query; +import jakarta.persistence.TemporalType; import java.util.ArrayList; import java.util.Calendar; import java.util.Collection; @@ -59,7 +59,7 @@ public class ParameterManager { private final Map valuesParameters = new TreeMap<>(); private final ParameterRegistrationVisitor parameterRegistrationVisitor; private final ParameterUnregistrationVisitor parameterUnregistrationVisitor; - private Map, String> criteriaNameMapping; + private Map, String> criteriaNameMapping; private int positionalOffset = -1; // Records the last positional parameter index that was used public ParameterManager(JpaProvider jpaProvider, EntityMetamodel entityMetamodel) { @@ -183,7 +183,7 @@ void collectParameterListNames(Query q, Set parameterListNames, String s String parameterName = p.getName(); // In case of positional parameters, we convert the position to a string and look it up instead if (parameterName == null) { - if (criteriaNameMapping != null && p instanceof javax.persistence.criteria.ParameterExpression) { + if (criteriaNameMapping != null && p instanceof jakarta.persistence.criteria.ParameterExpression) { parameterName = criteriaNameMapping.get(p); } else { parameterName = p.getPosition().toString(); @@ -208,7 +208,7 @@ void parameterizeQuery(Query q, String skippedParameterPrefix) { String parameterName = p.getName(); // In case of positional parameters, we convert the position to a string and look it up instead if (parameterName == null) { - if (criteriaNameMapping != null && p instanceof javax.persistence.criteria.ParameterExpression) { + if (criteriaNameMapping != null && p instanceof jakarta.persistence.criteria.ParameterExpression) { parameterName = criteriaNameMapping.get(p); } else { parameterName = p.getPosition().toString(); @@ -259,7 +259,7 @@ public Collection> getParameterImpls() { return parameters.values(); } - public Map, String> getCriteriaNameMapping() { + public Map, String> getCriteriaNameMapping() { return criteriaNameMapping; } @@ -503,7 +503,7 @@ public void setParameterType(String parameterName, Class type) { parameter.setParameterType((Class) type); } - public void registerCriteriaParameter(String parameterName, javax.persistence.criteria.ParameterExpression parameterExpression) { + public void registerCriteriaParameter(String parameterName, jakarta.persistence.criteria.ParameterExpression parameterExpression) { if (parameterName == null) { throw new NullPointerException("parameterName"); } @@ -540,7 +540,7 @@ public static final class ParameterImpl implements ExtendedParameter { private final Map>> clauseTypes; private boolean usedInImplicitGroupBy; private Class parameterType; - private javax.persistence.criteria.ParameterExpression criteriaParameter; + private jakarta.persistence.criteria.ParameterExpression criteriaParameter; private T value; private boolean valueSet; private ParameterValueTransformer transformer; @@ -619,11 +619,11 @@ public void setParameterType(Class parameterType) { this.parameterType = parameterType; } - public javax.persistence.criteria.ParameterExpression getCriteriaParameter() { + public jakarta.persistence.criteria.ParameterExpression getCriteriaParameter() { return criteriaParameter; } - public void setCriteriaParameter(javax.persistence.criteria.ParameterExpression criteriaParameter) { + public void setCriteriaParameter(jakarta.persistence.criteria.ParameterExpression criteriaParameter) { this.criteriaParameter = criteriaParameter; this.parameterType = criteriaParameter.getParameterType(); } diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/ParameterValueTransformer.java b/core/impl/src/main/java/com/blazebit/persistence/impl/ParameterValueTransformer.java index d550414ae6..3fdaac805c 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/ParameterValueTransformer.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/ParameterValueTransformer.java @@ -5,7 +5,7 @@ package com.blazebit.persistence.impl; -import javax.persistence.Query; +import jakarta.persistence.Query; /** * @author Christian Beikov diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/ResolvingQueryGenerator.java b/core/impl/src/main/java/com/blazebit/persistence/impl/ResolvingQueryGenerator.java index f9a0dcb153..2eec5c940e 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/ResolvingQueryGenerator.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/ResolvingQueryGenerator.java @@ -51,13 +51,13 @@ import com.blazebit.persistence.spi.JpaProvider; import com.blazebit.persistence.spi.JpqlFunction; -import javax.persistence.metamodel.Attribute; -import javax.persistence.metamodel.EmbeddableType; -import javax.persistence.metamodel.EntityType; -import javax.persistence.metamodel.IdentifiableType; -import javax.persistence.metamodel.ManagedType; -import javax.persistence.metamodel.MapAttribute; -import javax.persistence.metamodel.Type; +import jakarta.persistence.metamodel.Attribute; +import jakarta.persistence.metamodel.EmbeddableType; +import jakarta.persistence.metamodel.EntityType; +import jakarta.persistence.metamodel.IdentifiableType; +import jakarta.persistence.metamodel.ManagedType; +import jakarta.persistence.metamodel.MapAttribute; +import jakarta.persistence.metamodel.Type; import java.sql.Time; import java.sql.Timestamp; import java.util.Arrays; @@ -292,7 +292,9 @@ protected boolean isSimpleSubquery(SubqueryExpression expression) { final boolean hasLimit = hasFirstResult || hasMaxResults; final boolean hasSetOperations = subquery instanceof BaseFinalSetOperationBuilder; final boolean hasEntityFunctions = subquery.joinManager.hasEntityFunctions(); - return !hasLimit && !hasSetOperations && !hasEntityFunctions && !subquery.joinManager.hasLateInlineNodes(); + return (jpaProvider.supportsSubqueryLimitOffset() || !hasLimit) + && (jpaProvider.supportsSetOperations() || !hasSetOperations) + && !hasEntityFunctions && !subquery.joinManager.hasLateInlineNodes(); } return super.isSimpleSubquery(expression); } @@ -885,37 +887,22 @@ public void visit(ArrayExpression expression) { public void visit(InPredicate predicate) { boolean quantifiedPredicate = this.quantifiedPredicate; this.quantifiedPredicate = true; - if (predicate.getRight().size() == 1 && jpaProvider.needsAssociationToIdRewriteInOnClause() && clauseType == ClauseType.JOIN) { - Expression right = predicate.getRight().get(0); - if (right instanceof ParameterExpression) { - ParameterExpression parameterExpression = (ParameterExpression) right; - @SuppressWarnings("unchecked") - Type associationType = getAssociationType(predicate.getLeft(), right); - // If the association type is a entity type, we transform it - if (associationType instanceof EntityType) { - renderEquality(predicate.getLeft(), right, predicate.isNegated(), PredicateQuantifier.ONE); - } else { - super.visit(predicate); - } - } else if (right instanceof PathExpression) { - renderEquality(predicate.getLeft(), right, predicate.isNegated(), PredicateQuantifier.ONE); - } else { - super.visit(predicate); - } + Expression right; + SubqueryExpression subqueryExpression; + if (!externalRepresentation + && predicate.getRight().size() == 1 && (right = predicate.getRight().get(0)) instanceof SubqueryExpression + && (subqueryExpression = (SubqueryExpression) right).getSubquery() instanceof SubqueryInternalBuilder + && ((SubqueryInternalBuilder) subqueryExpression.getSubquery()).getMaxResults() == 1) { + // This is a special rewrite for databases like e.g. MySQL + predicate.getLeft().accept(this); + sb.append(predicate.isNegated() ? " <> " : " = "); + right.accept(this); } else { super.visit(predicate); } this.quantifiedPredicate = quantifiedPredicate; } - private Type getAssociationType(Expression expression1, Expression expression2) { - if (expression1 instanceof PathExpression) { - return ((PathExpression) expression1).getPathReference().getType(); - } - - return ((PathExpression) expression2).getPathReference().getType(); - } - @Override public void visit(final EqPredicate predicate) { boolean quantifiedPredicate = this.quantifiedPredicate; @@ -938,60 +925,47 @@ private void renderEquality(Expression left, Expression right, boolean negated, Expression expressionToSplit = needsEmbeddableSplitting(left, right); - if (jpaProvider.needsAssociationToIdRewriteInOnClause() && clauseType == ClauseType.JOIN) { - boolean rewritten = renderAssociationIdIfPossible(left); + if (expressionToSplit == null || !(left instanceof ParameterExpression) && !(right instanceof ParameterExpression)) { + left.accept(this); sb.append(operator); if (quantifier != PredicateQuantifier.ONE) { sb.append(quantifier.toString()); } - rewritten |= renderAssociationIdIfPossible(right); - if (rewritten) { - rewriteToIdParam(left); - rewriteToIdParam(right); - } + right.accept(this); } else { - if (expressionToSplit == null || dbmsDialect.supportsAnsiRowValueConstructor() || !(left instanceof ParameterExpression) && !(right instanceof ParameterExpression)) { - left.accept(this); - sb.append(operator); - if (quantifier != PredicateQuantifier.ONE) { - sb.append(quantifier.toString()); - } - right.accept(this); + // We split the path and the parameter expression accordingly + // TODO: Try to handle map key expressions, although no JPA provider supports de-referencing map keys + PathExpression pathExpression = (PathExpression) expressionToSplit; + ParameterExpression parameterExpression; + if (left instanceof ParameterExpression) { + parameterExpression = (ParameterExpression) left; } else { - // We split the path and the parameter expression accordingly - // TODO: Try to handle map key expressions, although no JPA provider supports de-referencing map keys - PathExpression pathExpression = (PathExpression) expressionToSplit; - ParameterExpression parameterExpression; - if (left instanceof ParameterExpression) { - parameterExpression = (ParameterExpression) left; - } else { - parameterExpression = (ParameterExpression) right; + parameterExpression = (ParameterExpression) right; + } + PathReference pathReference = pathExpression.getPathReference(); + EmbeddableType embeddableType = (EmbeddableType) pathReference.getType(); + String parameterName = parameterExpression.getName(); + Map> parameterAccessPaths = new HashMap<>(); + ParameterManager.ParameterImpl parameter = parameterManager.getParameter(parameterName); + sb.append('('); + for (Attribute attribute : embeddableType.getAttributes()) { + ((JoinNode) pathReference.getBaseNode()).appendDeReference(sb, pathReference.getField() + "." + attribute.getName(), externalRepresentation); + String embeddedPropertyName = attribute.getName(); + String subParamName = "_" + parameterName + "_" + embeddedPropertyName.replace('.', '_'); + sb.append(operator); + sb.append(":").append(subParamName); + if (parameter.getTransformer() == null) { + parameterManager.registerParameterName(subParamName, false, null, null); } - PathReference pathReference = pathExpression.getPathReference(); - EmbeddableType embeddableType = (EmbeddableType) pathReference.getType(); - String parameterName = parameterExpression.getName(); - Map> parameterAccessPaths = new HashMap<>(); - ParameterManager.ParameterImpl parameter = parameterManager.getParameter(parameterName); - sb.append('('); - for (Attribute attribute : embeddableType.getAttributes()) { - ((JoinNode) pathReference.getBaseNode()).appendDeReference(sb, pathReference.getField() + "." + attribute.getName(), externalRepresentation); - String embeddedPropertyName = attribute.getName(); - String subParamName = "_" + parameterName + "_" + embeddedPropertyName.replace('.', '_'); - sb.append(operator); - sb.append(":").append(subParamName); - if (parameter.getTransformer() == null) { - parameterManager.registerParameterName(subParamName, false, null, null); - } - parameterAccessPaths.put(subParamName, Arrays.asList(embeddedPropertyName.split("\\."))); + parameterAccessPaths.put(subParamName, Arrays.asList(embeddedPropertyName.split("\\."))); - sb.append(" AND "); - } - sb.setLength(sb.length() - " AND ".length()); - sb.append(')'); + sb.append(" AND "); + } + sb.setLength(sb.length() - " AND ".length()); + sb.append(')'); - if (parameter.getTransformer() == null) { - parameter.setTransformer(new SplittingParameterTransformer(parameterManager, entityMetamodel, embeddableType.getJavaType(), parameterAccessPaths)); - } + if (parameter.getTransformer() == null) { + parameter.setTransformer(new SplittingParameterTransformer(parameterManager, entityMetamodel, embeddableType.getJavaType(), parameterAccessPaths)); } } setBooleanLiteralRenderingContext(oldBooleanLiteralRenderingContext); diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/SelectManager.java b/core/impl/src/main/java/com/blazebit/persistence/impl/SelectManager.java index 484b1a1626..1e41273561 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/SelectManager.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/SelectManager.java @@ -50,11 +50,11 @@ import com.blazebit.persistence.spi.JpqlFunction; import com.blazebit.persistence.spi.JpqlFunctionProcessor; -import javax.persistence.Tuple; -import javax.persistence.metamodel.EmbeddableType; -import javax.persistence.metamodel.IdentifiableType; -import javax.persistence.metamodel.ManagedType; -import javax.persistence.metamodel.SingularAttribute; +import jakarta.persistence.Tuple; +import jakarta.persistence.metamodel.EmbeddableType; +import jakarta.persistence.metamodel.IdentifiableType; +import jakarta.persistence.metamodel.ManagedType; +import jakarta.persistence.metamodel.SingularAttribute; import java.lang.reflect.Constructor; import java.util.ArrayList; import java.util.Collection; diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/SimplePathReference.java b/core/impl/src/main/java/com/blazebit/persistence/impl/SimplePathReference.java index 9e9403d907..3ed1eb0912 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/SimplePathReference.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/SimplePathReference.java @@ -11,7 +11,7 @@ import com.blazebit.persistence.parser.expression.BaseNode; import com.blazebit.persistence.parser.expression.PathReference; -import javax.persistence.metamodel.Type; +import jakarta.persistence.metamodel.Type; /** * @author Christian Beikov diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/SplittingParameterTransformer.java b/core/impl/src/main/java/com/blazebit/persistence/impl/SplittingParameterTransformer.java index 87a1fb1c46..d5de775085 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/SplittingParameterTransformer.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/SplittingParameterTransformer.java @@ -9,9 +9,9 @@ import com.blazebit.persistence.parser.util.JpaMetamodelUtils; import com.blazebit.reflection.ReflectionUtils; -import javax.persistence.Query; -import javax.persistence.metamodel.Attribute; -import javax.persistence.metamodel.ManagedType; +import jakarta.persistence.Query; +import jakarta.persistence.metamodel.Attribute; +import jakarta.persistence.metamodel.ManagedType; import java.lang.reflect.Field; import java.lang.reflect.Member; import java.lang.reflect.Method; diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/SplittingVisitor.java b/core/impl/src/main/java/com/blazebit/persistence/impl/SplittingVisitor.java index b85d201835..23fb74c7a0 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/SplittingVisitor.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/SplittingVisitor.java @@ -15,7 +15,7 @@ import com.blazebit.persistence.parser.expression.PropertyExpression; import com.blazebit.persistence.spi.JpaProvider; -import javax.persistence.metamodel.Type; +import jakarta.persistence.metamodel.Type; import java.util.ArrayList; import java.util.List; diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/StartOngoingSetOperationSubqueryBuilderImpl.java b/core/impl/src/main/java/com/blazebit/persistence/impl/StartOngoingSetOperationSubqueryBuilderImpl.java index b1a74563ab..9362b97229 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/StartOngoingSetOperationSubqueryBuilderImpl.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/StartOngoingSetOperationSubqueryBuilderImpl.java @@ -13,7 +13,7 @@ import com.blazebit.persistence.parser.expression.ExpressionFactory; import com.blazebit.persistence.spi.SetOperationType; -import javax.persistence.Tuple; +import jakarta.persistence.Tuple; import java.util.Map; /** diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/SubqueryBuilderImpl.java b/core/impl/src/main/java/com/blazebit/persistence/impl/SubqueryBuilderImpl.java index 828c194827..41c59b17de 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/SubqueryBuilderImpl.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/SubqueryBuilderImpl.java @@ -15,7 +15,7 @@ import com.blazebit.persistence.parser.expression.ExpressionFactory; import com.blazebit.persistence.spi.SetOperationType; -import javax.persistence.Tuple; +import jakarta.persistence.Tuple; import java.util.ArrayList; import java.util.List; import java.util.Map; diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/SubqueryInitiatorImpl.java b/core/impl/src/main/java/com/blazebit/persistence/impl/SubqueryInitiatorImpl.java index cd349ec812..3cd5d023f7 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/SubqueryInitiatorImpl.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/SubqueryInitiatorImpl.java @@ -15,7 +15,7 @@ import com.blazebit.persistence.parser.expression.ExpressionCopyContext; import com.blazebit.persistence.parser.expression.ExpressionFactory; -import javax.persistence.metamodel.EntityType; +import jakarta.persistence.metamodel.EntityType; import java.util.Arrays; import java.util.Collection; diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/TransientEntityAssociationParameterTransformerFactory.java b/core/impl/src/main/java/com/blazebit/persistence/impl/TransientEntityAssociationParameterTransformerFactory.java index f179ccc057..e9e7e02cbc 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/TransientEntityAssociationParameterTransformerFactory.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/TransientEntityAssociationParameterTransformerFactory.java @@ -8,8 +8,8 @@ import com.blazebit.persistence.parser.EntityMetamodel; import com.blazebit.persistence.parser.util.JpaMetamodelUtils; -import javax.persistence.metamodel.Attribute; -import javax.persistence.metamodel.IdentifiableType; +import jakarta.persistence.metamodel.Attribute; +import jakarta.persistence.metamodel.IdentifiableType; /** * @author Christian Beikov diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/TreatedJoinAliasInfo.java b/core/impl/src/main/java/com/blazebit/persistence/impl/TreatedJoinAliasInfo.java index 806d7ae35b..5e82e8861e 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/TreatedJoinAliasInfo.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/TreatedJoinAliasInfo.java @@ -5,7 +5,7 @@ package com.blazebit.persistence.impl; -import javax.persistence.metamodel.EntityType; +import jakarta.persistence.metamodel.EntityType; /** * This is the join alias info for "special" join nodes that aren't rendered as joins diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/ValuesParameterBinder.java b/core/impl/src/main/java/com/blazebit/persistence/impl/ValuesParameterBinder.java index 7adcdfe6e8..e992bf9af6 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/ValuesParameterBinder.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/ValuesParameterBinder.java @@ -7,7 +7,7 @@ import com.blazebit.persistence.spi.AttributeAccessor; -import javax.persistence.Query; +import jakarta.persistence.Query; import java.util.Collection; import java.util.Iterator; diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/builder/object/DelegatingTupleObjectBuilder.java b/core/impl/src/main/java/com/blazebit/persistence/impl/builder/object/DelegatingTupleObjectBuilder.java index 4c4131ac34..5e6f33f81c 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/builder/object/DelegatingTupleObjectBuilder.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/builder/object/DelegatingTupleObjectBuilder.java @@ -8,7 +8,7 @@ import com.blazebit.persistence.ObjectBuilder; import com.blazebit.persistence.impl.SelectInfo; -import javax.persistence.Tuple; +import jakarta.persistence.Tuple; import java.util.List; import java.util.Map; diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/builder/object/ReturningTupleObjectBuilder.java b/core/impl/src/main/java/com/blazebit/persistence/impl/builder/object/ReturningTupleObjectBuilder.java index a29c0fcf28..9112bae244 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/builder/object/ReturningTupleObjectBuilder.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/builder/object/ReturningTupleObjectBuilder.java @@ -9,8 +9,8 @@ import java.util.Arrays; import java.util.List; -import javax.persistence.Tuple; -import javax.persistence.TupleElement; +import jakarta.persistence.Tuple; +import jakarta.persistence.TupleElement; import com.blazebit.persistence.ReturningObjectBuilder; import com.blazebit.persistence.SimpleReturningBuilder; diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/builder/object/TupleObjectBuilder.java b/core/impl/src/main/java/com/blazebit/persistence/impl/builder/object/TupleObjectBuilder.java index af80250163..1174125500 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/builder/object/TupleObjectBuilder.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/builder/object/TupleObjectBuilder.java @@ -10,8 +10,8 @@ import java.util.List; import java.util.Map; -import javax.persistence.Tuple; -import javax.persistence.TupleElement; +import jakarta.persistence.Tuple; +import jakarta.persistence.TupleElement; import com.blazebit.persistence.ObjectBuilder; import com.blazebit.persistence.SelectBuilder; diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/builder/predicate/AbstractQuantifiablePredicateBuilder.java b/core/impl/src/main/java/com/blazebit/persistence/impl/builder/predicate/AbstractQuantifiablePredicateBuilder.java index c45cde33cd..9bad38a91d 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/builder/predicate/AbstractQuantifiablePredicateBuilder.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/builder/predicate/AbstractQuantifiablePredicateBuilder.java @@ -42,7 +42,7 @@ import com.blazebit.persistence.parser.predicate.QuantifiableBinaryExpressionPredicate; import com.blazebit.persistence.parser.util.TypeUtils; -import javax.persistence.metamodel.EntityType; +import jakarta.persistence.metamodel.EntityType; import java.util.Collection; /** diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/dialect/DefaultDbmsDialect.java b/core/impl/src/main/java/com/blazebit/persistence/impl/dialect/DefaultDbmsDialect.java index 1e5142f932..fc4d7365df 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/dialect/DefaultDbmsDialect.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/dialect/DefaultDbmsDialect.java @@ -87,7 +87,7 @@ public boolean supportsNonRecursiveWithClause() { } @Override - public boolean supportsWithClauseHead() { + public boolean supportsPaginationInWithClause() { return supportsWithClause(); } diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/dialect/OracleDbmsDialect.java b/core/impl/src/main/java/com/blazebit/persistence/impl/dialect/OracleDbmsDialect.java index aa73946a0b..a8700a2553 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/dialect/OracleDbmsDialect.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/dialect/OracleDbmsDialect.java @@ -107,9 +107,9 @@ public String getWithClause(boolean recursive) { } @Override - public boolean supportsWithClauseHead() { - // NOTE: For 10g return false - return true; + public boolean supportsPaginationInWithClause() { + // Actually, only need it for Hibernate ORM + return false; } @Override diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/dialect/PostgreSQLDbmsDialect.java b/core/impl/src/main/java/com/blazebit/persistence/impl/dialect/PostgreSQLDbmsDialect.java index 2c2343c7c1..886bfa4c03 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/dialect/PostgreSQLDbmsDialect.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/dialect/PostgreSQLDbmsDialect.java @@ -191,12 +191,14 @@ public Map appendExtendedSql(StringBuilder sqlSb, DbmsStatementT if (returningColumns != null) { sqlSb.append(" returning "); + int start = withClause == null ? 0 : withClause.length(); + String alias = determineAlias(sqlSb, dmlAffectedTable, start, statementType); for (int i = 0; i < returningColumns.length; i++) { if (i != 0) { sqlSb.append(","); } - sqlSb.append(dmlAffectedTable).append('.'); + sqlSb.append(alias).append('.'); sqlSb.append(returningColumns[i]); } } @@ -207,7 +209,38 @@ public Map appendExtendedSql(StringBuilder sqlSb, DbmsStatementT return null; } - + + private String determineAlias(StringBuilder sqlSb, String dmlAffectedTable, int start, DbmsStatementType statementType) { + int tableIndex = sqlSb.indexOf(" " + dmlAffectedTable + " ", start); + int aliasIndex = tableIndex + dmlAffectedTable.length() + 2; + if (statementType == DbmsStatementType.UPDATE) { + int setIndex = SqlUtils.indexOfSet(sqlSb, aliasIndex); + if (setIndex != -1) { + return sqlSb.substring(aliasIndex, setIndex); + } + } else if (statementType == DbmsStatementType.INSERT) { + int parenthesisIndex = sqlSb.indexOf("(", aliasIndex); + int asIndex = sqlSb.indexOf( " as ", aliasIndex - 1); + if (asIndex != -1 && asIndex < parenthesisIndex) { + return sqlSb.substring(asIndex + 4, parenthesisIndex).trim(); + } + } else { + int whereIndex = SqlUtils.indexOfWhere(sqlSb, start); + if (whereIndex != -1) { + int usingIndex = sqlSb.indexOf( " using " ); + if (usingIndex == -1) { + return sqlSb.substring(aliasIndex, whereIndex); + } + } else { + int nextSpaceIndex = sqlSb.indexOf(" ", aliasIndex + 1); + if (nextSpaceIndex != -1 && " returning ".equals(sqlSb.substring(nextSpaceIndex))) { + return sqlSb.substring(aliasIndex, nextSpaceIndex); + } + } + } + return dmlAffectedTable; + } + @Override protected String[] appendSetOperands(StringBuilder sqlSb, SetOperationType setType, String operator, boolean isSubquery, List operands, boolean hasOuterClause) { boolean first = true; diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/function/entity/ValuesEntity.java b/core/impl/src/main/java/com/blazebit/persistence/impl/function/entity/ValuesEntity.java index a604c45edf..090271e25c 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/function/entity/ValuesEntity.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/function/entity/ValuesEntity.java @@ -7,9 +7,9 @@ import com.blazebit.persistence.CTE; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; import java.io.Serializable; /** diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/function/nullsubquery/NullSubqueryFunction.java b/core/impl/src/main/java/com/blazebit/persistence/impl/function/nullsubquery/NullSubqueryFunction.java index 88aee72b34..d988ddc076 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/function/nullsubquery/NullSubqueryFunction.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/function/nullsubquery/NullSubqueryFunction.java @@ -17,6 +17,12 @@ public class NullSubqueryFunction implements JpqlFunction { public static final String FUNCTION_NAME = "null_subquery"; + private final String fromDual; + + public NullSubqueryFunction(String fromDual) { + this.fromDual = fromDual; + } + @Override public boolean hasArguments() { return true; @@ -34,6 +40,10 @@ public Class getReturnType(Class firstArgumentType) { @Override public void render(FunctionRenderContext context) { - context.addChunk("(select null)"); + context.addChunk("(select null"); + if (fromDual != null) { + context.addChunk(fromDual); + } + context.addChunk(")"); } } diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/function/tostringjson/OracleToStringJsonFunction.java b/core/impl/src/main/java/com/blazebit/persistence/impl/function/tostringjson/OracleToStringJsonFunction.java index c2e44130a2..40c1fe5fb0 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/function/tostringjson/OracleToStringJsonFunction.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/function/tostringjson/OracleToStringJsonFunction.java @@ -38,8 +38,7 @@ public void render(FunctionRenderContext context, String[] fields, String[] sele context.addChunk(postChunk); context.addChunk(subquery.substring(fromIndex)); } else { - int limitIndex = SqlUtils.indexOfLimit(subquery, orderByIndex); - if (limitIndex == -1) { + if (SqlUtils.indexOfLimit(subquery, orderByIndex) == -1 && SqlUtils.indexOfFetchFirst(subquery, orderByIndex) == -1) { context.addChunk(preChunk); StringBuilder sb = new StringBuilder(fromIndex); diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/function/tostringjson/PostgreSQLToStringJsonFunction.java b/core/impl/src/main/java/com/blazebit/persistence/impl/function/tostringjson/PostgreSQLToStringJsonFunction.java index 8a0fefca71..dde6fc1696 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/function/tostringjson/PostgreSQLToStringJsonFunction.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/function/tostringjson/PostgreSQLToStringJsonFunction.java @@ -26,8 +26,7 @@ public void render(FunctionRenderContext context, String[] fields, String[] sele context.addChunk("))"); context.addChunk(subquery.substring(fromIndex)); } else { - int limitIndex = SqlUtils.indexOfLimit(subquery, orderByIndex); - if (limitIndex == -1) { + if (SqlUtils.indexOfLimit(subquery, orderByIndex) == -1 && SqlUtils.indexOfFetchFirst(subquery, orderByIndex) == -1) { renderJsonObjectArguments(context, fields, selectItemExpressions); context.addChunk("))"); context.addChunk(" OVER ("); diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/function/tostringxml/PostgreSQLToStringXmlFunction.java b/core/impl/src/main/java/com/blazebit/persistence/impl/function/tostringxml/PostgreSQLToStringXmlFunction.java index d88768c7c5..df7851f706 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/function/tostringxml/PostgreSQLToStringXmlFunction.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/function/tostringxml/PostgreSQLToStringXmlFunction.java @@ -26,8 +26,7 @@ public void render(FunctionRenderContext context, String[] fields, String[] sele context.addChunk("))"); context.addChunk(subquery.substring(fromIndex)); } else { - int limitIndex = SqlUtils.indexOfLimit(subquery, orderByIndex); - if (limitIndex == -1) { + if (SqlUtils.indexOfLimit(subquery, orderByIndex) == -1 && SqlUtils.indexOfFetchFirst(subquery, orderByIndex) == -1) { renderXmlElementArguments(context, fields, selectItemExpressions); context.addChunk("))"); context.addChunk(" OVER ("); diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/plan/CustomModificationQueryPlan.java b/core/impl/src/main/java/com/blazebit/persistence/impl/plan/CustomModificationQueryPlan.java index c1cdb26eee..87b4fada74 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/plan/CustomModificationQueryPlan.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/plan/CustomModificationQueryPlan.java @@ -8,7 +8,7 @@ import com.blazebit.persistence.spi.ExtendedQuerySupport; import com.blazebit.persistence.spi.ServiceProvider; -import javax.persistence.Query; +import jakarta.persistence.Query; import java.util.List; /** diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/plan/CustomReturningModificationQueryPlan.java b/core/impl/src/main/java/com/blazebit/persistence/impl/plan/CustomReturningModificationQueryPlan.java index a118271ebe..c6907fd2ef 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/plan/CustomReturningModificationQueryPlan.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/plan/CustomReturningModificationQueryPlan.java @@ -12,7 +12,7 @@ import com.blazebit.persistence.spi.ExtendedQuerySupport; import com.blazebit.persistence.spi.ServiceProvider; -import javax.persistence.Query; +import jakarta.persistence.Query; import java.util.ArrayList; import java.util.Arrays; import java.util.List; diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/plan/CustomSelectQueryPlan.java b/core/impl/src/main/java/com/blazebit/persistence/impl/plan/CustomSelectQueryPlan.java index 72cdc00ddd..2fb5518617 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/plan/CustomSelectQueryPlan.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/plan/CustomSelectQueryPlan.java @@ -8,7 +8,7 @@ import com.blazebit.persistence.spi.ExtendedQuerySupport; import com.blazebit.persistence.spi.ServiceProvider; -import javax.persistence.Query; +import jakarta.persistence.Query; import java.util.List; import java.util.stream.Stream; diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/plan/DefaultModificationQueryPlan.java b/core/impl/src/main/java/com/blazebit/persistence/impl/plan/DefaultModificationQueryPlan.java index 33574cccc0..b65329c8c0 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/plan/DefaultModificationQueryPlan.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/plan/DefaultModificationQueryPlan.java @@ -7,7 +7,7 @@ import com.blazebit.persistence.spi.DbmsStatementType; -import javax.persistence.Query; +import jakarta.persistence.Query; /** * diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/plan/DefaultSelectQueryPlan.java b/core/impl/src/main/java/com/blazebit/persistence/impl/plan/DefaultSelectQueryPlan.java index 03237770f8..2f8588e76c 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/plan/DefaultSelectQueryPlan.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/plan/DefaultSelectQueryPlan.java @@ -5,7 +5,7 @@ package com.blazebit.persistence.impl.plan; -import javax.persistence.Query; +import jakarta.persistence.Query; import java.util.List; import java.util.stream.Stream; diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/query/AbstractCustomQuery.java b/core/impl/src/main/java/com/blazebit/persistence/impl/query/AbstractCustomQuery.java index 797a78787e..1c15d470e0 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/query/AbstractCustomQuery.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/query/AbstractCustomQuery.java @@ -11,10 +11,10 @@ import com.blazebit.persistence.impl.util.SetView; import com.blazebit.persistence.spi.CteQueryWrapper; -import javax.persistence.Parameter; -import javax.persistence.Query; -import javax.persistence.TemporalType; -import javax.persistence.criteria.ParameterExpression; +import jakarta.persistence.Parameter; +import jakarta.persistence.Query; +import jakarta.persistence.TemporalType; +import jakarta.persistence.criteria.ParameterExpression; import java.util.Calendar; import java.util.Collection; import java.util.Collections; diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/query/CTEQuerySpecification.java b/core/impl/src/main/java/com/blazebit/persistence/impl/query/CTEQuerySpecification.java index f2448ecc0b..3790c61800 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/query/CTEQuerySpecification.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/query/CTEQuerySpecification.java @@ -8,8 +8,8 @@ import com.blazebit.persistence.impl.AbstractCommonQueryBuilder; import com.blazebit.persistence.impl.plan.SelectQueryPlan; -import javax.persistence.Parameter; -import javax.persistence.Query; +import jakarta.persistence.Parameter; +import jakarta.persistence.Query; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/query/CollectionDeleteModificationQuerySpecification.java b/core/impl/src/main/java/com/blazebit/persistence/impl/query/CollectionDeleteModificationQuerySpecification.java index 02c82e028d..e0573d8e32 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/query/CollectionDeleteModificationQuerySpecification.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/query/CollectionDeleteModificationQuerySpecification.java @@ -10,8 +10,8 @@ import com.blazebit.persistence.impl.util.SqlUtils; import com.blazebit.persistence.spi.DbmsModificationState; -import javax.persistence.Parameter; -import javax.persistence.Query; +import jakarta.persistence.Parameter; +import jakarta.persistence.Query; import java.util.Collection; import java.util.List; import java.util.Map; diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/query/CollectionInsertModificationQuerySpecification.java b/core/impl/src/main/java/com/blazebit/persistence/impl/query/CollectionInsertModificationQuerySpecification.java index e7203becce..4134f6d8c3 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/query/CollectionInsertModificationQuerySpecification.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/query/CollectionInsertModificationQuerySpecification.java @@ -10,8 +10,8 @@ import com.blazebit.persistence.impl.util.SqlUtils; import com.blazebit.persistence.spi.DbmsModificationState; -import javax.persistence.Parameter; -import javax.persistence.Query; +import jakarta.persistence.Parameter; +import jakarta.persistence.Query; import java.util.ArrayList; import java.util.Collection; import java.util.HashSet; diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/query/CollectionUpdateModificationQuerySpecification.java b/core/impl/src/main/java/com/blazebit/persistence/impl/query/CollectionUpdateModificationQuerySpecification.java index 70f099c3bb..d2fafd4aac 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/query/CollectionUpdateModificationQuerySpecification.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/query/CollectionUpdateModificationQuerySpecification.java @@ -10,8 +10,8 @@ import com.blazebit.persistence.impl.util.SqlUtils; import com.blazebit.persistence.spi.DbmsModificationState; -import javax.persistence.Parameter; -import javax.persistence.Query; +import jakarta.persistence.Parameter; +import jakarta.persistence.Query; import java.util.Collection; import java.util.List; import java.util.Map; diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/query/CustomQuerySpecification.java b/core/impl/src/main/java/com/blazebit/persistence/impl/query/CustomQuerySpecification.java index 7e7555e4da..986be201fc 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/query/CustomQuerySpecification.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/query/CustomQuerySpecification.java @@ -18,9 +18,9 @@ import com.blazebit.persistence.spi.LateralStyle; import com.blazebit.persistence.spi.ServiceProvider; -import javax.persistence.EntityManager; -import javax.persistence.Parameter; -import javax.persistence.Query; +import jakarta.persistence.EntityManager; +import jakarta.persistence.Parameter; +import jakarta.persistence.Query; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; @@ -239,17 +239,9 @@ public String extract(StringBuilder sb, int index, int currentPosition) { newSqlSb.append(','); } - String originalAlias = SqlUtils.extractAlias(sb); - int aliasPosition = sb.length() - originalAlias.length() - 1; - // Replace the original alias with the new one - if (aliasPosition != -1 && sb.charAt(aliasPosition) == ' ') { - newSqlSb.append(sb, 0, aliasPosition + 1); - } else { - // Append the new alias - newSqlSb.append(sb); - newSqlSb.append(" as "); - } - + // Append the new alias + newSqlSb.append(sb); + newSqlSb.append(" as "); newSqlSb.append(newAliases[index]); return Integer.toString(currentPosition); diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/query/CustomReturningSQLTypedQuery.java b/core/impl/src/main/java/com/blazebit/persistence/impl/query/CustomReturningSQLTypedQuery.java index d00668c4a6..48efbf28e5 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/query/CustomReturningSQLTypedQuery.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/query/CustomReturningSQLTypedQuery.java @@ -9,13 +9,13 @@ import com.blazebit.persistence.impl.ParameterValueTransformer; import com.blazebit.persistence.impl.ValuesParameterBinder; -import javax.persistence.FlushModeType; -import javax.persistence.LockModeType; -import javax.persistence.Parameter; -import javax.persistence.PersistenceException; -import javax.persistence.TemporalType; -import javax.persistence.TypedQuery; -import javax.persistence.criteria.ParameterExpression; +import jakarta.persistence.FlushModeType; +import jakarta.persistence.LockModeType; +import jakarta.persistence.Parameter; +import jakarta.persistence.PersistenceException; +import jakarta.persistence.TemporalType; +import jakarta.persistence.TypedQuery; +import jakarta.persistence.criteria.ParameterExpression; import java.util.*; import java.util.stream.Stream; diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/query/CustomSQLQuery.java b/core/impl/src/main/java/com/blazebit/persistence/impl/query/CustomSQLQuery.java index 5ad830c8c6..3fef04de8e 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/query/CustomSQLQuery.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/query/CustomSQLQuery.java @@ -8,11 +8,11 @@ import com.blazebit.persistence.impl.ParameterValueTransformer; import com.blazebit.persistence.impl.ValuesParameterBinder; -import javax.persistence.FlushModeType; -import javax.persistence.LockModeType; -import javax.persistence.PersistenceException; -import javax.persistence.Query; -import javax.persistence.criteria.ParameterExpression; +import jakarta.persistence.FlushModeType; +import jakarta.persistence.LockModeType; +import jakarta.persistence.PersistenceException; +import jakarta.persistence.Query; +import jakarta.persistence.criteria.ParameterExpression; import java.util.List; import java.util.Map; import java.util.stream.Stream; diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/query/CustomSQLTypedQuery.java b/core/impl/src/main/java/com/blazebit/persistence/impl/query/CustomSQLTypedQuery.java index 0f7cd16f62..a0ff244b99 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/query/CustomSQLTypedQuery.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/query/CustomSQLTypedQuery.java @@ -8,14 +8,14 @@ import com.blazebit.persistence.impl.ParameterValueTransformer; import com.blazebit.persistence.impl.ValuesParameterBinder; -import javax.persistence.FlushModeType; -import javax.persistence.LockModeType; -import javax.persistence.Parameter; -import javax.persistence.PersistenceException; -import javax.persistence.Query; -import javax.persistence.TemporalType; -import javax.persistence.TypedQuery; -import javax.persistence.criteria.ParameterExpression; +import jakarta.persistence.FlushModeType; +import jakarta.persistence.LockModeType; +import jakarta.persistence.Parameter; +import jakarta.persistence.PersistenceException; +import jakarta.persistence.Query; +import jakarta.persistence.TemporalType; +import jakarta.persistence.TypedQuery; +import jakarta.persistence.criteria.ParameterExpression; import java.util.Calendar; import java.util.Date; import java.util.List; diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/query/DefaultQuerySpecification.java b/core/impl/src/main/java/com/blazebit/persistence/impl/query/DefaultQuerySpecification.java index ab9895b0e7..b924efc970 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/query/DefaultQuerySpecification.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/query/DefaultQuerySpecification.java @@ -12,9 +12,9 @@ import com.blazebit.persistence.spi.DbmsStatementType; import com.blazebit.persistence.spi.ExtendedQuerySupport; -import javax.persistence.EntityManager; -import javax.persistence.Parameter; -import javax.persistence.Query; +import jakarta.persistence.EntityManager; +import jakarta.persistence.Parameter; +import jakarta.persistence.Query; import java.util.Arrays; import java.util.Collection; import java.util.List; diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/query/DeleteModificationQuerySpecification.java b/core/impl/src/main/java/com/blazebit/persistence/impl/query/DeleteModificationQuerySpecification.java index 777757ac37..669072a5b2 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/query/DeleteModificationQuerySpecification.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/query/DeleteModificationQuerySpecification.java @@ -10,8 +10,8 @@ import com.blazebit.persistence.impl.util.SqlUtils; import com.blazebit.persistence.spi.DbmsModificationState; -import javax.persistence.Parameter; -import javax.persistence.Query; +import jakarta.persistence.Parameter; +import jakarta.persistence.Query; import java.util.ArrayList; import java.util.Collection; import java.util.List; diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/query/ModificationQuerySpecification.java b/core/impl/src/main/java/com/blazebit/persistence/impl/query/ModificationQuerySpecification.java index 2fd5463a22..676934fd2b 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/query/ModificationQuerySpecification.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/query/ModificationQuerySpecification.java @@ -16,8 +16,8 @@ import com.blazebit.persistence.spi.DbmsModificationState; import com.blazebit.persistence.spi.DbmsStatementType; -import javax.persistence.Parameter; -import javax.persistence.Query; +import jakarta.persistence.Parameter; +import jakarta.persistence.Query; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; @@ -107,7 +107,12 @@ protected void initialize() { affectedDmlTable = sqlQuery.substring(fromIndex + SqlUtils.FROM.length(), endIndex == -1 ? sqlQuery.length() : endIndex); } else if (statementType == DbmsStatementType.INSERT) { int intoIndex = sqlQuery.indexOf(" into "); - affectedDmlTable = sqlQuery.substring(intoIndex + " into ".length(), sqlQuery.indexOf('(', intoIndex + " into ".length() + 1)); + int intoEndIndex = sqlQuery.indexOf('(', intoIndex + " into ".length() + 1); + affectedDmlTable = sqlQuery.substring(intoIndex + " into ".length(), intoEndIndex); + int asIndex = affectedDmlTable.indexOf(" as "); + if (asIndex != -1) { + affectedDmlTable = affectedDmlTable.substring(0, asIndex); + } } else { throw new UnsupportedOperationException("Unsupported statement type: " + statementType); } diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/query/ObjectBuilderTypedQuery.java b/core/impl/src/main/java/com/blazebit/persistence/impl/query/ObjectBuilderTypedQuery.java index b9928e635a..e57adaccd3 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/query/ObjectBuilderTypedQuery.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/query/ObjectBuilderTypedQuery.java @@ -13,10 +13,10 @@ import java.util.function.Function; import java.util.stream.Stream; -import javax.persistence.NoResultException; -import javax.persistence.NonUniqueResultException; -import javax.persistence.TypedQuery; -import javax.persistence.criteria.ParameterExpression; +import jakarta.persistence.NoResultException; +import jakarta.persistence.NonUniqueResultException; +import jakarta.persistence.TypedQuery; +import jakarta.persistence.criteria.ParameterExpression; /** * diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/query/QuerySpecification.java b/core/impl/src/main/java/com/blazebit/persistence/impl/query/QuerySpecification.java index f93731626e..654165761c 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/query/QuerySpecification.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/query/QuerySpecification.java @@ -8,8 +8,8 @@ import com.blazebit.persistence.impl.plan.ModificationQueryPlan; import com.blazebit.persistence.impl.plan.SelectQueryPlan; -import javax.persistence.Parameter; -import javax.persistence.Query; +import jakarta.persistence.Parameter; +import jakarta.persistence.Query; import java.util.Collection; import java.util.List; import java.util.Map; diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/query/QueryWrapper.java b/core/impl/src/main/java/com/blazebit/persistence/impl/query/QueryWrapper.java index c6bf138a2f..e0912b8972 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/query/QueryWrapper.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/query/QueryWrapper.java @@ -5,12 +5,12 @@ package com.blazebit.persistence.impl.query; -import javax.persistence.FlushModeType; -import javax.persistence.LockModeType; -import javax.persistence.Parameter; -import javax.persistence.Query; -import javax.persistence.TemporalType; -import javax.persistence.criteria.ParameterExpression; +import jakarta.persistence.FlushModeType; +import jakarta.persistence.LockModeType; +import jakarta.persistence.Parameter; +import jakarta.persistence.Query; +import jakarta.persistence.TemporalType; +import jakarta.persistence.criteria.ParameterExpression; import java.util.Calendar; import java.util.Date; import java.util.HashMap; diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/query/SetOperationQuerySpecification.java b/core/impl/src/main/java/com/blazebit/persistence/impl/query/SetOperationQuerySpecification.java index 4798edc029..7bfebfec6f 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/query/SetOperationQuerySpecification.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/query/SetOperationQuerySpecification.java @@ -11,8 +11,8 @@ import com.blazebit.persistence.spi.OrderByElement; import com.blazebit.persistence.spi.SetOperationType; -import javax.persistence.Parameter; -import javax.persistence.Query; +import jakarta.persistence.Parameter; +import jakarta.persistence.Query; import java.util.ArrayList; import java.util.Collection; import java.util.List; diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/query/SetTypedQuery.java b/core/impl/src/main/java/com/blazebit/persistence/impl/query/SetTypedQuery.java index 7f9486bbc2..4304e1a3d0 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/query/SetTypedQuery.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/query/SetTypedQuery.java @@ -5,8 +5,8 @@ package com.blazebit.persistence.impl.query; -import javax.persistence.Query; -import javax.persistence.TypedQuery; +import jakarta.persistence.Query; +import jakarta.persistence.TypedQuery; import java.util.List; /** diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/query/TypedQueryWrapper.java b/core/impl/src/main/java/com/blazebit/persistence/impl/query/TypedQueryWrapper.java index da8ac4a522..5870d7829c 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/query/TypedQueryWrapper.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/query/TypedQueryWrapper.java @@ -10,12 +10,12 @@ import java.util.List; import java.util.Map; import java.util.stream.Stream; -import javax.persistence.FlushModeType; -import javax.persistence.LockModeType; -import javax.persistence.Parameter; -import javax.persistence.TemporalType; -import javax.persistence.TypedQuery; -import javax.persistence.criteria.ParameterExpression; +import jakarta.persistence.FlushModeType; +import jakarta.persistence.LockModeType; +import jakarta.persistence.Parameter; +import jakarta.persistence.TemporalType; +import jakarta.persistence.TypedQuery; +import jakarta.persistence.criteria.ParameterExpression; /** * diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/query/UpdateModificationQuerySpecification.java b/core/impl/src/main/java/com/blazebit/persistence/impl/query/UpdateModificationQuerySpecification.java index 9ba6d7a279..921bba7448 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/query/UpdateModificationQuerySpecification.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/query/UpdateModificationQuerySpecification.java @@ -11,8 +11,8 @@ import com.blazebit.persistence.spi.DbmsModificationState; import com.blazebit.persistence.spi.UpdateJoinStyle; -import javax.persistence.Parameter; -import javax.persistence.Query; +import jakarta.persistence.Parameter; +import jakarta.persistence.Query; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/transform/SizeTransformationVisitor.java b/core/impl/src/main/java/com/blazebit/persistence/impl/transform/SizeTransformationVisitor.java index af5a116290..94887558b4 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/transform/SizeTransformationVisitor.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/transform/SizeTransformationVisitor.java @@ -36,14 +36,14 @@ import com.blazebit.persistence.parser.util.JpaMetamodelUtils; import com.blazebit.persistence.spi.JpaProvider; -import javax.persistence.metamodel.Attribute; -import javax.persistence.metamodel.EntityType; -import javax.persistence.metamodel.IdentifiableType; -import javax.persistence.metamodel.ManagedType; -import javax.persistence.metamodel.PluralAttribute; -import javax.persistence.metamodel.SingularAttribute; -import javax.persistence.metamodel.Type; -import javax.persistence.metamodel.Type.PersistenceType; +import jakarta.persistence.metamodel.Attribute; +import jakarta.persistence.metamodel.EntityType; +import jakarta.persistence.metamodel.IdentifiableType; +import jakarta.persistence.metamodel.ManagedType; +import jakarta.persistence.metamodel.PluralAttribute; +import jakarta.persistence.metamodel.SingularAttribute; +import jakarta.persistence.metamodel.Type; +import jakarta.persistence.metamodel.Type.PersistenceType; import java.util.ArrayList; import java.util.EnumSet; import java.util.HashMap; diff --git a/core/impl/src/main/java/com/blazebit/persistence/impl/util/SqlUtils.java b/core/impl/src/main/java/com/blazebit/persistence/impl/util/SqlUtils.java index a2ae4511b2..9335674aa7 100644 --- a/core/impl/src/main/java/com/blazebit/persistence/impl/util/SqlUtils.java +++ b/core/impl/src/main/java/com/blazebit/persistence/impl/util/SqlUtils.java @@ -514,8 +514,8 @@ public static int indexOfSelect(CharSequence sql) { return indexOf(SELECT_FINDER, sql, 0, Math.max(withIndex, 0)); } - public static int indexOfSet(CharSequence sql) { - return indexOf(SET_FINDER, sql, 0, 0); + public static int indexOfSet(CharSequence sql, int start) { + return indexOf(SET_FINDER, sql, start, 0); } public static int indexOfFrom(CharSequence sql) { diff --git a/core/impl/src/main/java/module-info.java b/core/impl/src/main/java/module-info.java new file mode 100644 index 0000000000..03c69c1231 --- /dev/null +++ b/core/impl/src/main/java/module-info.java @@ -0,0 +1,139 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * Copyright Blazebit + */ + +module com.blazebit.persistence.core.impl { + requires java.sql; + requires jakarta.persistence; + requires com.blazebit.common.utils; + requires com.blazebit.persistence.core; + requires com.blazebit.persistence.core.parser; + exports com.blazebit.persistence.impl; + exports com.blazebit.persistence.impl.builder.expression; + exports com.blazebit.persistence.impl.builder.object; + exports com.blazebit.persistence.impl.builder.predicate; + exports com.blazebit.persistence.impl.dialect; + exports com.blazebit.persistence.impl.function; + exports com.blazebit.persistence.impl.function.alias; + exports com.blazebit.persistence.impl.function.base64; + exports com.blazebit.persistence.impl.function.cast; + exports com.blazebit.persistence.impl.function.chr; + exports com.blazebit.persistence.impl.function.colldml; + exports com.blazebit.persistence.impl.function.coltrunc; + exports com.blazebit.persistence.impl.function.concat; + exports com.blazebit.persistence.impl.function.count; + exports com.blazebit.persistence.impl.function.countwrapper; + exports com.blazebit.persistence.impl.function.dateadd; + exports com.blazebit.persistence.impl.function.dateadd.day; + exports com.blazebit.persistence.impl.function.dateadd.hour; + exports com.blazebit.persistence.impl.function.dateadd.microseconds; + exports com.blazebit.persistence.impl.function.dateadd.milliseconds; + exports com.blazebit.persistence.impl.function.dateadd.minute; + exports com.blazebit.persistence.impl.function.dateadd.month; + exports com.blazebit.persistence.impl.function.dateadd.quarter; + exports com.blazebit.persistence.impl.function.dateadd.second; + exports com.blazebit.persistence.impl.function.dateadd.week; + exports com.blazebit.persistence.impl.function.dateadd.year; + exports com.blazebit.persistence.impl.function.datediff; + exports com.blazebit.persistence.impl.function.datediff.day; + exports com.blazebit.persistence.impl.function.datediff.hour; + exports com.blazebit.persistence.impl.function.datediff.microsecond; + exports com.blazebit.persistence.impl.function.datediff.millisecond; + exports com.blazebit.persistence.impl.function.datediff.minute; + exports com.blazebit.persistence.impl.function.datediff.month; + exports com.blazebit.persistence.impl.function.datediff.quarter; + exports com.blazebit.persistence.impl.function.datediff.second; + exports com.blazebit.persistence.impl.function.datediff.week; + exports com.blazebit.persistence.impl.function.datediff.year; + exports com.blazebit.persistence.impl.function.datetime.day; + exports com.blazebit.persistence.impl.function.datetime.dayofweek; + exports com.blazebit.persistence.impl.function.datetime.dayofyear; + exports com.blazebit.persistence.impl.function.datetime.epoch; + exports com.blazebit.persistence.impl.function.datetime.epochday; + exports com.blazebit.persistence.impl.function.datetime.epochmicro; + exports com.blazebit.persistence.impl.function.datetime.epochmilli; + exports com.blazebit.persistence.impl.function.datetime.hour; + exports com.blazebit.persistence.impl.function.datetime.isodayofweek; + exports com.blazebit.persistence.impl.function.datetime.isoweek; + exports com.blazebit.persistence.impl.function.datetime.microsecond; + exports com.blazebit.persistence.impl.function.datetime.millisecond; + exports com.blazebit.persistence.impl.function.datetime.minute; + exports com.blazebit.persistence.impl.function.datetime.month; + exports com.blazebit.persistence.impl.function.datetime.quarter; + exports com.blazebit.persistence.impl.function.datetime.second; + exports com.blazebit.persistence.impl.function.datetime.week; + exports com.blazebit.persistence.impl.function.datetime.year; + exports com.blazebit.persistence.impl.function.datetime.yearofweek; + exports com.blazebit.persistence.impl.function.datetime.yearweek; + exports com.blazebit.persistence.impl.function.entity; + exports com.blazebit.persistence.impl.function.every; + exports com.blazebit.persistence.impl.function.exist; + exports com.blazebit.persistence.impl.function.greatest; + exports com.blazebit.persistence.impl.function.groupconcat; + exports com.blazebit.persistence.impl.function.grouping; + exports com.blazebit.persistence.impl.function.groupingsets; + exports com.blazebit.persistence.impl.function.jsonget; + exports com.blazebit.persistence.impl.function.jsonset; + exports com.blazebit.persistence.impl.function.least; + exports com.blazebit.persistence.impl.function.limit; + exports com.blazebit.persistence.impl.function.literal; + exports com.blazebit.persistence.impl.function.nullfn; + exports com.blazebit.persistence.impl.function.nullsubquery; + exports com.blazebit.persistence.impl.function.oragg; + exports com.blazebit.persistence.impl.function.pageposition; + exports com.blazebit.persistence.impl.function.param; + exports com.blazebit.persistence.impl.function.querywrapper; + exports com.blazebit.persistence.impl.function.repeat; + exports com.blazebit.persistence.impl.function.replace; + exports com.blazebit.persistence.impl.function.rowvalue; + exports com.blazebit.persistence.impl.function.set; + exports com.blazebit.persistence.impl.function.stringjsonagg; + exports com.blazebit.persistence.impl.function.stringxmlagg; + exports com.blazebit.persistence.impl.function.subquery; + exports com.blazebit.persistence.impl.function.tomultiset; + exports com.blazebit.persistence.impl.function.tostringjson; + exports com.blazebit.persistence.impl.function.tostringxml; + exports com.blazebit.persistence.impl.function.treat; + exports com.blazebit.persistence.impl.function.trunc; + exports com.blazebit.persistence.impl.function.trunc.day; + exports com.blazebit.persistence.impl.function.trunc.hour; + exports com.blazebit.persistence.impl.function.trunc.microseconds; + exports com.blazebit.persistence.impl.function.trunc.milliseconds; + exports com.blazebit.persistence.impl.function.trunc.minute; + exports com.blazebit.persistence.impl.function.trunc.month; + exports com.blazebit.persistence.impl.function.trunc.quarter; + exports com.blazebit.persistence.impl.function.trunc.second; + exports com.blazebit.persistence.impl.function.trunc.week; + exports com.blazebit.persistence.impl.function.trunc.year; + exports com.blazebit.persistence.impl.function.window; + exports com.blazebit.persistence.impl.function.window.avg; + exports com.blazebit.persistence.impl.function.window.count; + exports com.blazebit.persistence.impl.function.window.cumedist; + exports com.blazebit.persistence.impl.function.window.denserank; + exports com.blazebit.persistence.impl.function.window.every; + exports com.blazebit.persistence.impl.function.window.first; + exports com.blazebit.persistence.impl.function.window.groupconcat; + exports com.blazebit.persistence.impl.function.window.lag; + exports com.blazebit.persistence.impl.function.window.last; + exports com.blazebit.persistence.impl.function.window.lead; + exports com.blazebit.persistence.impl.function.window.max; + exports com.blazebit.persistence.impl.function.window.min; + exports com.blazebit.persistence.impl.function.window.nth; + exports com.blazebit.persistence.impl.function.window.ntile; + exports com.blazebit.persistence.impl.function.window.oragg; + exports com.blazebit.persistence.impl.function.window.percentrank; + exports com.blazebit.persistence.impl.function.window.rank; + exports com.blazebit.persistence.impl.function.window.row; + exports com.blazebit.persistence.impl.function.window.sum; + exports com.blazebit.persistence.impl.keyset; + exports com.blazebit.persistence.impl.plan; + exports com.blazebit.persistence.impl.query; + exports com.blazebit.persistence.impl.transform; + exports com.blazebit.persistence.impl.util; + opens com.blazebit.persistence.impl.function.entity to org.hibernate.orm.core, eclipselink; + uses com.blazebit.persistence.spi.EntityManagerFactoryIntegrator; + uses com.blazebit.persistence.spi.ExtendedQuerySupport; + uses com.blazebit.persistence.spi.CriteriaBuilderConfigurationContributor; + provides com.blazebit.persistence.spi.CriteriaBuilderConfigurationProvider with com.blazebit.persistence.impl.CriteriaBuilderConfigurationProviderImpl; +} \ No newline at end of file diff --git a/core/impl/src/main/java9/com/blazebit/persistence/impl/CallerChecker.java b/core/impl/src/main/java9/com/blazebit/persistence/impl/CallerChecker.java deleted file mode 100644 index d1214d0199..0000000000 --- a/core/impl/src/main/java9/com/blazebit/persistence/impl/CallerChecker.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Blazebit - */ - -package com.blazebit.persistence.impl; - -import java.util.Set; - -/** - * A contract that checks if the caller of our caller is trusted. On Java 9 this will actually check modules. - * - * @author Christian Beikov - * @since 1.2.0 - */ -class CallerChecker { - - private CallerChecker() { - } - - public static boolean isCallerTrusted() { - return StackWalker.getInstance(Set.of(), 2).walk(stackFrames -> { - return stackFrames.limit(2).allMatch(s -> s.getClassName().startsWith("com.blazebit.persistence.")); - }); - } -} diff --git a/core/impl/src/main/resources/META-INF/MANIFEST.MF b/core/impl/src/main/resources/META-INF/MANIFEST.MF deleted file mode 100644 index e714012cef..0000000000 --- a/core/impl/src/main/resources/META-INF/MANIFEST.MF +++ /dev/null @@ -1 +0,0 @@ -Multi-Release: true diff --git a/core/parser-jakarta/pom.xml b/core/parser-jakarta/pom.xml deleted file mode 100644 index d0e8905dcb..0000000000 --- a/core/parser-jakarta/pom.xml +++ /dev/null @@ -1,227 +0,0 @@ - - - - - 4.0.0 - - - com.blazebit - blaze-persistence-core - 1.6.15-SNAPSHOT - ../pom.xml - - - blaze-persistence-core-parser-jakarta - jar - - - com.blazebit.persistence.core.parser - - - - - ${project.groupId} - blaze-persistence-core-parser - provided - - - jakarta.persistence - jakarta.persistence-api - ${version.jakarta-jpa-api} - provided - - - ${project.groupId} - blaze-common-utils - - - - - - - maven-antrun-plugin - - - transform-jar - package - - run - - - - - - - - - - - - - - - - - - - - - - transform-sources-jar - package - - run - - - - - - - - - - - - - - - - - - - - - - - - transform-javadoc - package - - run - - - - - - - - - - - - - - - - - - - - - - - - - unpack-classes - package - - - - - - - run - - - - - - org.eclipse.transformer - org.eclipse.transformer.cli - 0.5.0 - - - ant-contrib - ant-contrib - 1.0b3 - - - ant - ant - - - - - biz.aQute.bnd - biz.aQute.bnd.transform - ${version.bnd} - compile - - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - attach-artifacts - package - - attach-artifact - - - - - ${project.build.directory}/${project.build.finalName}-sources.jar - sources - jar - - - - - - - - - - - blazebit-release - - - - org.codehaus.mojo - build-helper-maven-plugin - - - attach-artifacts - package - - attach-artifact - - - - - ${project.build.directory}/${project.build.finalName}-sources.jar - sources - jar - - - ${project.build.directory}/${project.build.finalName}-javadoc.jar - javadoc - jar - - - - - - - - - - - - diff --git a/core/parser-jar/pom.xml b/core/parser-jar/pom.xml deleted file mode 100644 index 81b6bc42da..0000000000 --- a/core/parser-jar/pom.xml +++ /dev/null @@ -1,121 +0,0 @@ - - - - - 4.0.0 - - - com.blazebit - blaze-persistence-core - 1.6.15-SNAPSHOT - ../pom.xml - - - blaze-persistence-core-parser-jar - jar - - - com.blazebit.persistence.core.parser - - - - - ${project.groupId} - blaze-common-utils - - - ${project.groupId} - blaze-persistence-core-parser - - - - - - - org.apache.maven.plugins - maven-shade-plugin - - - package - - shade - - - true - - - ${project.groupId}:blaze-persistence-core-parser - - META-INF/versions/** - module-info.class - - - - - - - - - - - - - blazebit-release - - - - maven-dependency-plugin - - - shade-javadoc - - copy - - - - - ${project.groupId} - blaze-persistence-core-parser - ${project.version} - jar - javadoc - true - ${project.build.directory} - ${project.artifactId}-${project.version}-javadoc.jar - - - - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - attach-artifacts - package - - attach-artifact - - - - - ${project.build.directory}/${project.artifactId}-${project.version}-javadoc.jar - javadoc - jar - - - - - - - - - - - - diff --git a/core/parser/pom.xml b/core/parser/pom.xml index c75426bbf2..5e9c03c1bd 100644 --- a/core/parser/pom.xml +++ b/core/parser/pom.xml @@ -10,7 +10,7 @@ com.blazebit blaze-persistence-core - 1.6.15-SNAPSHOT + 2.0.0-SNAPSHOT ../pom.xml @@ -24,10 +24,9 @@ - - org.apache.openejb - javaee-api + jakarta.persistence + jakarta.persistence-api provided @@ -41,7 +40,7 @@ org.antlr antlr4-runtime - 4.7.2 + 4.13.0 org.abego.treelayout.core @@ -96,7 +95,7 @@ org.antlr antlr4-maven-plugin - 4.7.2 + 4.13.0 generate-sources @@ -128,36 +127,6 @@ - - org.moditect - moditect-maven-plugin - - - add-module-infos - package - - add-module-info - - - - - module ${module.name} { - requires java.sql; - requires java.persistence; - requires com.blazebit.common.utils; - exports com.blazebit.persistence.parser; - exports com.blazebit.persistence.parser.expression; - exports com.blazebit.persistence.parser.expression.modifier; - exports com.blazebit.persistence.parser.predicate; - exports com.blazebit.persistence.parser.util; - uses com.blazebit.persistence.parser.util.TypeConverterContributor; - } - - - - - - diff --git a/core/parser/src/main/java/com/blazebit/persistence/parser/EntityMetamodel.java b/core/parser/src/main/java/com/blazebit/persistence/parser/EntityMetamodel.java index 1da5b578c9..2a9bd6a0de 100644 --- a/core/parser/src/main/java/com/blazebit/persistence/parser/EntityMetamodel.java +++ b/core/parser/src/main/java/com/blazebit/persistence/parser/EntityMetamodel.java @@ -5,16 +5,16 @@ package com.blazebit.persistence.parser; -import javax.persistence.metamodel.EntityType; -import javax.persistence.metamodel.ManagedType; -import javax.persistence.metamodel.Metamodel; -import javax.persistence.metamodel.Type; +import jakarta.persistence.metamodel.EntityType; +import jakarta.persistence.metamodel.ManagedType; +import jakarta.persistence.metamodel.Metamodel; +import jakarta.persistence.metamodel.Type; import java.util.Collection; import java.util.Map; import java.util.Set; /** - * This is a wrapper around the JPA {@link javax.persistence.metamodel.Metamodel} that allows additionally efficient access by other attributes than a Class. + * This is a wrapper around the JPA {@link jakarta.persistence.metamodel.Metamodel} that allows additionally efficient access by other attributes than a Class. * * @author Christian Beikov * @since 1.2.0 diff --git a/core/parser/src/main/java/com/blazebit/persistence/parser/ListIndexAttribute.java b/core/parser/src/main/java/com/blazebit/persistence/parser/ListIndexAttribute.java index c0a467c8ae..8f407f5ef6 100644 --- a/core/parser/src/main/java/com/blazebit/persistence/parser/ListIndexAttribute.java +++ b/core/parser/src/main/java/com/blazebit/persistence/parser/ListIndexAttribute.java @@ -5,11 +5,11 @@ package com.blazebit.persistence.parser; -import javax.persistence.metamodel.ListAttribute; -import javax.persistence.metamodel.ManagedType; -import javax.persistence.metamodel.PluralAttribute; -import javax.persistence.metamodel.SingularAttribute; -import javax.persistence.metamodel.Type; +import jakarta.persistence.metamodel.ListAttribute; +import jakarta.persistence.metamodel.ManagedType; +import jakarta.persistence.metamodel.PluralAttribute; +import jakarta.persistence.metamodel.SingularAttribute; +import jakarta.persistence.metamodel.Type; import java.lang.reflect.Member; /** diff --git a/core/parser/src/main/java/com/blazebit/persistence/parser/MapEntryAttribute.java b/core/parser/src/main/java/com/blazebit/persistence/parser/MapEntryAttribute.java index 87b2b2e156..62032514fd 100644 --- a/core/parser/src/main/java/com/blazebit/persistence/parser/MapEntryAttribute.java +++ b/core/parser/src/main/java/com/blazebit/persistence/parser/MapEntryAttribute.java @@ -5,11 +5,11 @@ package com.blazebit.persistence.parser; -import javax.persistence.metamodel.ManagedType; -import javax.persistence.metamodel.MapAttribute; -import javax.persistence.metamodel.PluralAttribute; -import javax.persistence.metamodel.SingularAttribute; -import javax.persistence.metamodel.Type; +import jakarta.persistence.metamodel.ManagedType; +import jakarta.persistence.metamodel.MapAttribute; +import jakarta.persistence.metamodel.PluralAttribute; +import jakarta.persistence.metamodel.SingularAttribute; +import jakarta.persistence.metamodel.Type; import java.lang.reflect.Member; import java.util.Map; diff --git a/core/parser/src/main/java/com/blazebit/persistence/parser/MapKeyAttribute.java b/core/parser/src/main/java/com/blazebit/persistence/parser/MapKeyAttribute.java index 28c282e4b4..a23aa7baec 100644 --- a/core/parser/src/main/java/com/blazebit/persistence/parser/MapKeyAttribute.java +++ b/core/parser/src/main/java/com/blazebit/persistence/parser/MapKeyAttribute.java @@ -5,11 +5,11 @@ package com.blazebit.persistence.parser; -import javax.persistence.metamodel.ManagedType; -import javax.persistence.metamodel.MapAttribute; -import javax.persistence.metamodel.PluralAttribute; -import javax.persistence.metamodel.SingularAttribute; -import javax.persistence.metamodel.Type; +import jakarta.persistence.metamodel.ManagedType; +import jakarta.persistence.metamodel.MapAttribute; +import jakarta.persistence.metamodel.PluralAttribute; +import jakarta.persistence.metamodel.SingularAttribute; +import jakarta.persistence.metamodel.Type; import java.lang.reflect.Member; /** diff --git a/core/parser/src/main/java/com/blazebit/persistence/parser/PathTargetResolvingExpressionVisitor.java b/core/parser/src/main/java/com/blazebit/persistence/parser/PathTargetResolvingExpressionVisitor.java index d2128295f7..9771c300d9 100644 --- a/core/parser/src/main/java/com/blazebit/persistence/parser/PathTargetResolvingExpressionVisitor.java +++ b/core/parser/src/main/java/com/blazebit/persistence/parser/PathTargetResolvingExpressionVisitor.java @@ -50,14 +50,14 @@ import com.blazebit.persistence.parser.util.JpaMetamodelUtils; import com.blazebit.reflection.ReflectionUtils; -import javax.persistence.metamodel.Attribute; -import javax.persistence.metamodel.EntityType; -import javax.persistence.metamodel.ListAttribute; -import javax.persistence.metamodel.ManagedType; -import javax.persistence.metamodel.MapAttribute; -import javax.persistence.metamodel.PluralAttribute; -import javax.persistence.metamodel.SingularAttribute; -import javax.persistence.metamodel.Type; +import jakarta.persistence.metamodel.Attribute; +import jakarta.persistence.metamodel.EntityType; +import jakarta.persistence.metamodel.ListAttribute; +import jakarta.persistence.metamodel.ManagedType; +import jakarta.persistence.metamodel.MapAttribute; +import jakarta.persistence.metamodel.PluralAttribute; +import jakarta.persistence.metamodel.SingularAttribute; +import jakarta.persistence.metamodel.Type; import java.lang.reflect.Field; import java.lang.reflect.Method; import java.util.ArrayList; @@ -200,7 +200,8 @@ private Type getType(Type baseType, Attribute attribute) { } Class baseClass = baseType.getJavaType(); - if (baseClass != null) { + // Hibernate ORM 6+ returns Map.class instead of null for map based entities + if (baseClass != null && baseClass != Map.class) { Class clazz = JpaMetamodelUtils.resolveFieldClass(baseType.getJavaType(), attribute); if (clazz != null) { return metamodel.type(clazz); diff --git a/core/parser/src/main/java/com/blazebit/persistence/parser/QualifiedAttribute.java b/core/parser/src/main/java/com/blazebit/persistence/parser/QualifiedAttribute.java index 91387ebd99..11ab5d7023 100644 --- a/core/parser/src/main/java/com/blazebit/persistence/parser/QualifiedAttribute.java +++ b/core/parser/src/main/java/com/blazebit/persistence/parser/QualifiedAttribute.java @@ -5,7 +5,7 @@ package com.blazebit.persistence.parser; -import javax.persistence.metamodel.PluralAttribute; +import jakarta.persistence.metamodel.PluralAttribute; /** * Super type for attributes like KEY/VALUE/ENTRY/INDEX diff --git a/core/parser/src/main/java/com/blazebit/persistence/parser/expression/PathReference.java b/core/parser/src/main/java/com/blazebit/persistence/parser/expression/PathReference.java index 208cb2fcfe..98cc5c307a 100644 --- a/core/parser/src/main/java/com/blazebit/persistence/parser/expression/PathReference.java +++ b/core/parser/src/main/java/com/blazebit/persistence/parser/expression/PathReference.java @@ -5,7 +5,7 @@ package com.blazebit.persistence.parser.expression; -import javax.persistence.metamodel.Type; +import jakarta.persistence.metamodel.Type; /** * TODO: documentation diff --git a/core/parser/src/main/java/com/blazebit/persistence/parser/util/JpaMetamodelUtils.java b/core/parser/src/main/java/com/blazebit/persistence/parser/util/JpaMetamodelUtils.java index 4c0ad02466..db9731db0f 100644 --- a/core/parser/src/main/java/com/blazebit/persistence/parser/util/JpaMetamodelUtils.java +++ b/core/parser/src/main/java/com/blazebit/persistence/parser/util/JpaMetamodelUtils.java @@ -8,15 +8,15 @@ import com.blazebit.persistence.parser.EntityMetamodel; import com.blazebit.reflection.ReflectionUtils; -import javax.persistence.metamodel.Attribute; -import javax.persistence.metamodel.EmbeddableType; -import javax.persistence.metamodel.EntityType; -import javax.persistence.metamodel.IdentifiableType; -import javax.persistence.metamodel.ManagedType; -import javax.persistence.metamodel.MapAttribute; -import javax.persistence.metamodel.PluralAttribute; -import javax.persistence.metamodel.SingularAttribute; -import javax.persistence.metamodel.Type; +import jakarta.persistence.metamodel.Attribute; +import jakarta.persistence.metamodel.EmbeddableType; +import jakarta.persistence.metamodel.EntityType; +import jakarta.persistence.metamodel.IdentifiableType; +import jakarta.persistence.metamodel.ManagedType; +import jakarta.persistence.metamodel.MapAttribute; +import jakarta.persistence.metamodel.PluralAttribute; +import jakarta.persistence.metamodel.SingularAttribute; +import jakarta.persistence.metamodel.Type; import java.lang.reflect.Field; import java.lang.reflect.Method; import java.lang.reflect.ParameterizedType; @@ -322,16 +322,23 @@ public static Class resolveFieldClass(Class baseClass, Attribute att * with the corresponding primitive type. * Note that it also returns just "any" type of an id class attribute in case there is no dedicated id class type. */ - if (entityType.getIdType() != null) { - final Class primitiveIdClass = ReflectionUtils.getPrimitiveClassOfWrapper(entityType.getIdType().getJavaType()); - if (primitiveIdClass == null) { - // Discover the identifier attributes like this instead for EclipseLink - Set> idTypes = collectIdAttributes(entityType); - if (!idTypes.isEmpty()) { - return idTypes; + try { + if (entityType.getIdType() != null) { + final Class primitiveIdClass = ReflectionUtils.getPrimitiveClassOfWrapper(entityType.getIdType().getJavaType()); + if (primitiveIdClass == null) { + // Discover the identifier attributes like this instead for EclipseLink + Set> idTypes = collectIdAttributes(entityType); + if (!idTypes.isEmpty()) { + return idTypes; + } + } else { + return Collections.>singleton(entityType.getId(primitiveIdClass)); } - } else { - return Collections.>singleton(entityType.getId(primitiveIdClass)); + } + } catch (IllegalArgumentException e2) { + // Try again on the super type. Eclipselink is a bit odd in this regard... + if (entityType.getSupertype() != null) { + return getIdAttributes(entityType.getSupertype()); } } throw e; diff --git a/core/parser/src/main/java/com/blazebit/persistence/parser/util/TypeUtils.java b/core/parser/src/main/java/com/blazebit/persistence/parser/util/TypeUtils.java index c3561eaf91..6dda4a5a45 100644 --- a/core/parser/src/main/java/com/blazebit/persistence/parser/util/TypeUtils.java +++ b/core/parser/src/main/java/com/blazebit/persistence/parser/util/TypeUtils.java @@ -7,7 +7,7 @@ import com.blazebit.persistence.parser.EntityMetamodel; -import javax.persistence.metamodel.EntityType; +import jakarta.persistence.metamodel.EntityType; import java.io.Serializable; import java.math.BigDecimal; import java.math.BigInteger; diff --git a/core/parser/src/main/java/module-info.java b/core/parser/src/main/java/module-info.java new file mode 100644 index 0000000000..7ef4fd53f2 --- /dev/null +++ b/core/parser/src/main/java/module-info.java @@ -0,0 +1,16 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * Copyright Blazebit + */ +module com.blazebit.persistence.core.parser { + requires java.sql; + requires jakarta.persistence; + requires com.blazebit.common.utils; + requires org.antlr.antlr4.runtime; + exports com.blazebit.persistence.parser; + exports com.blazebit.persistence.parser.expression; + exports com.blazebit.persistence.parser.expression.modifier; + exports com.blazebit.persistence.parser.predicate; + exports com.blazebit.persistence.parser.util; + uses com.blazebit.persistence.parser.util.TypeConverterContributor; +} \ No newline at end of file diff --git a/core/pom.xml b/core/pom.xml index ac36c503af..e42c848b73 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -10,7 +10,7 @@ com.blazebit blaze-persistence-parent - 1.6.15-SNAPSHOT + 2.0.0-SNAPSHOT ../parent/pom.xml @@ -24,55 +24,6 @@ parser impl testsuite - - api-jar - impl-jar - parser-jar - - api-jakarta - parser-jakarta - impl-jakarta + testsuite-hibernate - - - jakarta - - api - parser - impl - testsuite - testsuite-hibernate6 - - api-jar - impl-jar - parser-jar - - api-jakarta - parser-jakarta - impl-jakarta - testsuite-jakarta - testsuite-jakarta-runner - - - - blazebit-release - - api - parser - impl - testsuite - testsuite-hibernate6 - - api-jar - impl-jar - parser-jar - - api-jakarta - parser-jakarta - impl-jakarta - testsuite-jakarta - testsuite-jakarta-runner - - - diff --git a/core/testsuite-jakarta-runner/pom.xml b/core/testsuite-hibernate/pom.xml similarity index 58% rename from core/testsuite-jakarta-runner/pom.xml rename to core/testsuite-hibernate/pom.xml index b66c6c098e..0914275eff 100644 --- a/core/testsuite-jakarta-runner/pom.xml +++ b/core/testsuite-hibernate/pom.xml @@ -1,60 +1,58 @@ - - 4.0.0 - com.blazebit blaze-persistence-core - 1.6.15-SNAPSHOT + 2.0.0-SNAPSHOT ../pom.xml - blaze-persistence-core-testsuite-jakarta-runner + blaze-persistence-core-testsuite-hibernate jar - com.blazebit.persistence.core.testsuite - - 1.8 - ${test.java.version} - ${version.jakarta-jpa-api} - ${h2-2.version} - com.blazebit.persistence.testsuite - 2 - CoreTestsuite* + com.blazebit.persistence.core.testsuite.hibernate + com.blazebit.persistence.testsuite.hibernate + 0 + + + ${project.groupId} - blaze-persistence-core-testsuite-jakarta - ${project.version} + blaze-persistence-core-api test ${project.groupId} - blaze-persistence-core-testsuite-jakarta - ${project.version} - tests + blaze-persistence-core-impl test + - jakarta.persistence - jakarta.persistence-api - ${jpa-api-version} + ${project.groupId} + blaze-persistence-testsuite-base-hibernate6 + ${project.version} + compile ${project.groupId} - blaze-common-utils + blaze-persistence-core-testsuite + ${project.version} + compile + + + junit + junit + test + h2 @@ -70,20 +68,19 @@ ${maven.test.skip} ${surefireForkCount} ${project.build.directory}/surefire-reports/${surefire.forkNumber} + com.blazebit.persistence.testsuite.base.jpa.category.NoH2,${jpa.excludedGroups} jdbc:h2:mem:core${surefire.forkNumber};DB_CLOSE_DELAY=-1 admin admin org.h2.Driver - com.blazebit.persistence.testsuite.base.jpa.category.NoH2,com.blazebit.persistence.testsuite.base.jpa.category.NoH2Latest,${jpa.excludedGroups} ${testBasePackage} ${surefireForkCount} $${surefire.forkNumber} UTC + US + en - - com.blazebit:blaze-persistence-core-testsuite-jakarta - @@ -99,7 +96,7 @@ com.h2database h2 - ${version.h2} + ${h2.version} test @@ -116,67 +113,18 @@ ${maven.test.skip} ${surefireForkCount} ${project.build.directory}/surefire-reports/${surefire.forkNumber} + com.blazebit.persistence.testsuite.base.jpa.category.NoMySQL,${jpa.excludedGroups} jdbc:mysql://${dbHost}:3306/information_schema?useUnicode=true&characterEncoding=utf8&databaseTerm=schema&nullDatabaseMeansCurrent=true root com.mysql.jdbc.Driver core${surefire.forkNumber} - com.blazebit.persistence.testsuite.base.jpa.category.NoMySQL,com.blazebit.persistence.testsuite.base.jpa.category.NoMySQLOld,${jpa.excludedGroups} - ${testBasePackage} - ${surefireForkCount} - $${surefire.forkNumber} - UTC - - - com.blazebit:blaze-persistence-core-testsuite-jakarta - - - - - org.apache.maven.surefire - surefire-junit47 - ${version.surefire.plugin} - - - - - - - - mysql - mysql-connector-java - test - - - - - mysql8 - - - - org.apache.maven.plugins - maven-surefire-plugin - - ${test} - ${maven.test.skip} - ${surefireForkCount} - ${project.build.directory}/surefire-reports/${surefire.forkNumber} - - jdbc:mysql://${dbHost}:3306/information_schema?useUnicode=true&characterEncoding=utf8&databaseTerm=schema&nullDatabaseMeansCurrent=true - root - - com.mysql.jdbc.Driver - core${surefire.forkNumber} - com.blazebit.persistence.testsuite.base.jpa.category.NoMySQL,${jpa.excludedGroups} ${testBasePackage} ${surefireForkCount} $${surefire.forkNumber} UTC - - com.blazebit:blaze-persistence-core-testsuite-jakarta - @@ -207,21 +155,18 @@ ${test} ${surefireForkCount} ${project.build.directory}/surefire-reports/${surefire.forkNumber} + com.blazebit.persistence.testsuite.base.jpa.category.NoPostgreSQL,${jpa.excludedGroups} jdbc:postgresql://${dbHost}:5432/test postgres postgres org.postgresql.Driver core${surefire.forkNumber} - com.blazebit.persistence.testsuite.base.jpa.category.NoPostgreSQL,${jpa.excludedGroups} ${testBasePackage} ${surefireForkCount} $${surefire.forkNumber} UTC - - com.blazebit:blaze-persistence-core-testsuite-jakarta - @@ -241,45 +186,6 @@ - - sqlite - - - - org.apache.maven.plugins - maven-surefire-plugin - - ${test} - - jdbc:sqlite:test.db - - - org.sqlite.JDBC - com.blazebit.persistence.testsuite.base.jpa.category.NoSQLite,${jpa.excludedGroups} - ${testBasePackage} - - - com.blazebit:blaze-persistence-core-testsuite-jakarta - - - - - org.apache.maven.surefire - surefire-junit47 - ${version.surefire.plugin} - - - - - - - - org.xerial - sqlite-jdbc - test - - - db2 @@ -292,21 +198,18 @@ ${maven.test.skip} ${surefireForkCount} ${project.build.directory}/surefire-reports/${surefire.forkNumber} + com.blazebit.persistence.testsuite.base.jpa.category.NoDB2,${jpa.excludedGroups} jdbc:db2://${dbHost}:50000/test db2inst1 db2inst1-pwd com.ibm.db2.jcc.DB2Driver core${surefire.forkNumber} - com.blazebit.persistence.testsuite.base.jpa.category.NoDB2,${jpa.excludedGroups} ${testBasePackage} ${surefireForkCount} $${surefire.forkNumber} UTC - - com.blazebit:blaze-persistence-core-testsuite-jakarta - @@ -327,45 +230,6 @@ - - firebird - - - - org.apache.maven.plugins - maven-surefire-plugin - - ${test} - - jdbc:firebirdsql:${dbHost}:/tmp/test.fdb - SYSDBA - masterkey - org.firebirdsql.jdbc.FBDriver - com.blazebit.persistence.testsuite.base.jpa.category.NoFirebird,${jpa.excludedGroups} - ${testBasePackage} - - - com.blazebit:blaze-persistence-core-testsuite-jakarta - - - - - org.apache.maven.surefire - surefire-junit47 - ${version.surefire.plugin} - - - - - - - - org.firebirdsql.jdbc - jaybird-jdk16 - test - - - oracle @@ -378,6 +242,7 @@ ${maven.test.skip} ${surefireForkCount} ${project.build.directory}/surefire-reports/${surefire.forkNumber} + com.blazebit.persistence.testsuite.base.jpa.category.NoOracle,${jpa.excludedGroups} jdbc:oracle:thin:@${dbHost}:1521:XE SYSTEM @@ -391,14 +256,10 @@ true - com.blazebit.persistence.testsuite.base.jpa.category.NoOracle,${jpa.excludedGroups} ${testBasePackage} ${surefireForkCount} $${surefire.forkNumber} - - com.blazebit:blaze-persistence-core-testsuite-jakarta - @@ -430,21 +291,18 @@ ${maven.test.skip} ${surefireForkCount} ${project.build.directory}/surefire-reports/${surefire.forkNumber} + com.blazebit.persistence.testsuite.base.jpa.category.NoMSSQL,${jpa.excludedGroups} jdbc:sqlserver://${dbHost}:1433;trustServerCertificate=true sa Blaze-Persistence com.microsoft.sqlserver.jdbc.SQLServerDriver core${surefire.forkNumber} - com.blazebit.persistence.testsuite.base.jpa.category.NoMSSQL,${jpa.excludedGroups} ${testBasePackage} ${surefireForkCount} $${surefire.forkNumber} UTC - - com.blazebit:blaze-persistence-core-testsuite-jakarta - @@ -465,11 +323,11 @@ + hibernate-6.2 - ${version.jakarta-jpa-3.1-api} - com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate,com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate60 + com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate,com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate62 @@ -490,22 +348,22 @@ jakarta.xml.bind jakarta.xml.bind-api - ${version.jakarta-jaxb-api} + ${version.jaxb-api} com.sun.xml.bind jaxb-impl - ${version.jakarta-jaxb} + ${version.jaxb} jakarta.transaction jakarta.transaction-api - ${version.jakarta-jta} + ${version.jta-api} jakarta.activation jakarta.activation-api - ${version.jakarta-activation} + ${version.activation-api} ${project.groupId} @@ -526,74 +384,55 @@ provided - - - hibernate-6.3 - - ${version.jakarta-jpa-3.1-api} - com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate,com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate60 - - - - org.hibernate.orm - hibernate-core - ${version.hibernate-6.3} - - - org.hibernate.orm - hibernate-envers - ${version.hibernate-6.3} - - - org.hibernate.orm - hibernate-testing - ${version.hibernate-6.3} - - - jakarta.xml.bind - jakarta.xml.bind-api - ${version.jakarta-jaxb-api} - - - com.sun.xml.bind - jaxb-impl - ${version.jakarta-jaxb} - - - jakarta.transaction - jakarta.transaction-api - ${version.jakarta-jta} - - - jakarta.activation - jakarta.activation-api - ${version.jakarta-activation} - - - ${project.groupId} - blaze-persistence-integration-hibernate-6.2 - test - - - ${project.groupId} - blaze-persistence-testsuite-base-hibernate6 - ${project.version} - compile - - - - org.hibernate.orm - hibernate-jpamodelgen - ${version.hibernate-6.3} - provided - - + + + + maven-compiler-plugin + + + + + org.hibernate.orm + hibernate-jpamodelgen + ${version.hibernate-6.2} + + + jakarta.xml.bind + jakarta.xml.bind-api + ${version.jaxb-api} + + + com.sun.xml.bind + jaxb-impl + ${version.jaxb} + + + jakarta.transaction + jakarta.transaction-api + ${version.jta-api} + + + jakarta.activation + jakarta.activation-api + ${version.activation-api} + + + + org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor + + + + -AaddGeneratedAnnotation=false + + + + + hibernate-6.4 - ${version.jakarta-jpa-3.1-api} - com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate,com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate60 + com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate,com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate64 @@ -614,22 +453,22 @@ jakarta.xml.bind jakarta.xml.bind-api - ${version.jakarta-jaxb-api} + ${version.jaxb-api} com.sun.xml.bind jaxb-impl - ${version.jakarta-jaxb} + ${version.jaxb} jakarta.transaction jakarta.transaction-api - ${version.jakarta-jta} + ${version.jta-api} jakarta.activation jakarta.activation-api - ${version.jakarta-activation} + ${version.activation-api} ${project.groupId} @@ -650,74 +489,54 @@ provided - - - hibernate-6.5 - - ${version.jakarta-jpa-3.1-api} - com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate,com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate60 - - - - org.hibernate.orm - hibernate-core - ${version.hibernate-6.5} - - - org.hibernate.orm - hibernate-envers - ${version.hibernate-6.5} - - - org.hibernate.orm - hibernate-testing - ${version.hibernate-6.5} - - - jakarta.xml.bind - jakarta.xml.bind-api - ${version.jakarta-jaxb-api} - - - com.sun.xml.bind - jaxb-impl - ${version.jakarta-jaxb} - - - jakarta.transaction - jakarta.transaction-api - ${version.jakarta-jta} - - - jakarta.activation - jakarta.activation-api - ${version.jakarta-activation} - - - ${project.groupId} - blaze-persistence-integration-hibernate-6.2 - test - - - ${project.groupId} - blaze-persistence-testsuite-base-hibernate6 - ${project.version} - compile - - - - org.hibernate.orm - hibernate-jpamodelgen - ${version.hibernate-6.5} - provided - - + + + + maven-compiler-plugin + + + + + org.hibernate.orm + hibernate-jpamodelgen + ${version.hibernate-6.4} + + + jakarta.xml.bind + jakarta.xml.bind-api + ${version.jaxb-api} + + + com.sun.xml.bind + jaxb-impl + ${version.jaxb} + + + jakarta.transaction + jakarta.transaction-api + ${version.jta-api} + + + jakarta.activation + jakarta.activation-api + ${version.activation-api} + + + + org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor + + + + + hibernate-6.6 + + true + - ${version.jakarta-jpa-3.1-api} - com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate,com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate60,com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate66 + com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate,com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate66 @@ -738,22 +557,22 @@ jakarta.xml.bind jakarta.xml.bind-api - ${version.jakarta-jaxb-api} + ${version.jaxb-api} com.sun.xml.bind jaxb-impl - ${version.jakarta-jaxb} + ${version.jaxb} jakarta.transaction jakarta.transaction-api - ${version.jakarta-jta} + ${version.jta-api} jakarta.activation jakarta.activation-api - ${version.jakarta-activation} + ${version.activation-api} ${project.groupId} @@ -774,7 +593,76 @@ provided + + + + maven-compiler-plugin + + + + + org.hibernate.orm + hibernate-jpamodelgen + ${version.hibernate-6.6} + + + jakarta.xml.bind + jakarta.xml.bind-api + ${version.jaxb-api} + + + com.sun.xml.bind + jaxb-impl + ${version.jaxb} + + + jakarta.transaction + jakarta.transaction-api + ${version.jta-api} + + + jakarta.activation + jakarta.activation-api + ${version.activation-api} + + + + org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor + + + + + + + + + hibernate-apt + + + + maven-compiler-plugin + + true + true + + + + + + + + eclipselink + + + + maven-compiler-plugin + + true + true + + + + - diff --git a/core/testsuite-hibernate6/src/main/java/com/blazebit/persistence/testsuite/hibernate6/entity/IntegerProperty.java b/core/testsuite-hibernate/src/main/java/com/blazebit/persistence/testsuite/hibernate/entity/IntegerProperty.java similarity index 93% rename from core/testsuite-hibernate6/src/main/java/com/blazebit/persistence/testsuite/hibernate6/entity/IntegerProperty.java rename to core/testsuite-hibernate/src/main/java/com/blazebit/persistence/testsuite/hibernate/entity/IntegerProperty.java index fb1590cbb2..80b894d573 100644 --- a/core/testsuite-hibernate6/src/main/java/com/blazebit/persistence/testsuite/hibernate6/entity/IntegerProperty.java +++ b/core/testsuite-hibernate/src/main/java/com/blazebit/persistence/testsuite/hibernate/entity/IntegerProperty.java @@ -2,7 +2,7 @@ * SPDX-License-Identifier: Apache-2.0 * Copyright Blazebit */ -package com.blazebit.persistence.testsuite.hibernate6.entity; +package com.blazebit.persistence.testsuite.hibernate.entity; import jakarta.persistence.Column; import jakarta.persistence.Entity; diff --git a/core/testsuite-hibernate6/src/main/java/com/blazebit/persistence/testsuite/hibernate6/entity/Property.java b/core/testsuite-hibernate/src/main/java/com/blazebit/persistence/testsuite/hibernate/entity/Property.java similarity index 69% rename from core/testsuite-hibernate6/src/main/java/com/blazebit/persistence/testsuite/hibernate6/entity/Property.java rename to core/testsuite-hibernate/src/main/java/com/blazebit/persistence/testsuite/hibernate/entity/Property.java index 0642001176..f09bf115ff 100644 --- a/core/testsuite-hibernate6/src/main/java/com/blazebit/persistence/testsuite/hibernate6/entity/Property.java +++ b/core/testsuite-hibernate/src/main/java/com/blazebit/persistence/testsuite/hibernate/entity/Property.java @@ -2,7 +2,7 @@ * SPDX-License-Identifier: Apache-2.0 * Copyright Blazebit */ -package com.blazebit.persistence.testsuite.hibernate6.entity; +package com.blazebit.persistence.testsuite.hibernate.entity; public interface Property { diff --git a/core/testsuite-hibernate6/src/main/java/com/blazebit/persistence/testsuite/hibernate6/entity/PropertyHolder.java b/core/testsuite-hibernate/src/main/java/com/blazebit/persistence/testsuite/hibernate/entity/PropertyHolder.java similarity index 95% rename from core/testsuite-hibernate6/src/main/java/com/blazebit/persistence/testsuite/hibernate6/entity/PropertyHolder.java rename to core/testsuite-hibernate/src/main/java/com/blazebit/persistence/testsuite/hibernate/entity/PropertyHolder.java index ce28991a94..2a0fa10966 100644 --- a/core/testsuite-hibernate6/src/main/java/com/blazebit/persistence/testsuite/hibernate6/entity/PropertyHolder.java +++ b/core/testsuite-hibernate/src/main/java/com/blazebit/persistence/testsuite/hibernate/entity/PropertyHolder.java @@ -2,7 +2,7 @@ * SPDX-License-Identifier: Apache-2.0 * Copyright Blazebit */ -package com.blazebit.persistence.testsuite.hibernate6.entity; +package com.blazebit.persistence.testsuite.hibernate.entity; import jakarta.persistence.Column; import jakarta.persistence.DiscriminatorType; diff --git a/core/testsuite-hibernate6/src/main/java/com/blazebit/persistence/testsuite/hibernate6/entity/StringProperty.java b/core/testsuite-hibernate/src/main/java/com/blazebit/persistence/testsuite/hibernate/entity/StringProperty.java similarity index 93% rename from core/testsuite-hibernate6/src/main/java/com/blazebit/persistence/testsuite/hibernate6/entity/StringProperty.java rename to core/testsuite-hibernate/src/main/java/com/blazebit/persistence/testsuite/hibernate/entity/StringProperty.java index 232b1b7fbc..fc98840bd5 100644 --- a/core/testsuite-hibernate6/src/main/java/com/blazebit/persistence/testsuite/hibernate6/entity/StringProperty.java +++ b/core/testsuite-hibernate/src/main/java/com/blazebit/persistence/testsuite/hibernate/entity/StringProperty.java @@ -2,7 +2,7 @@ * SPDX-License-Identifier: Apache-2.0 * Copyright Blazebit */ -package com.blazebit.persistence.testsuite.hibernate6.entity; +package com.blazebit.persistence.testsuite.hibernate.entity; import jakarta.persistence.Column; import jakarta.persistence.Entity; diff --git a/core/testsuite-hibernate6/src/test/java/com/blazebit/persistence/testsuite/hibernate6/AnyMappingTest.java b/core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/AnyMappingTest.java similarity index 83% rename from core/testsuite-hibernate6/src/test/java/com/blazebit/persistence/testsuite/hibernate6/AnyMappingTest.java rename to core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/AnyMappingTest.java index 2b57a6d64e..f9a6e80c1e 100644 --- a/core/testsuite-hibernate6/src/test/java/com/blazebit/persistence/testsuite/hibernate6/AnyMappingTest.java +++ b/core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/AnyMappingTest.java @@ -2,11 +2,11 @@ * SPDX-License-Identifier: Apache-2.0 * Copyright Blazebit */ -package com.blazebit.persistence.testsuite.hibernate6; +package com.blazebit.persistence.testsuite.hibernate; import com.blazebit.persistence.CriteriaBuilder; import com.blazebit.persistence.testsuite.AbstractCoreTest; -import com.blazebit.persistence.testsuite.hibernate6.entity.PropertyHolder; +import com.blazebit.persistence.testsuite.hibernate.entity.PropertyHolder; import org.junit.jupiter.api.Test; import static org.junit.Assert.assertTrue; diff --git a/core/testsuite/src/test/hibernateold/com/blazebit/persistence/testsuite/CTESubselectFilteringTest.java b/core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/CTESubselectFilteringTest.java similarity index 90% rename from core/testsuite/src/test/hibernateold/com/blazebit/persistence/testsuite/CTESubselectFilteringTest.java rename to core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/CTESubselectFilteringTest.java index c125f1d01b..42d014b3ed 100644 --- a/core/testsuite/src/test/hibernateold/com/blazebit/persistence/testsuite/CTESubselectFilteringTest.java +++ b/core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/CTESubselectFilteringTest.java @@ -3,9 +3,10 @@ * Copyright Blazebit */ -package com.blazebit.persistence.testsuite; +package com.blazebit.persistence.testsuite.hibernate; import com.blazebit.persistence.CTE; +import com.blazebit.persistence.testsuite.AbstractCoreTest; import com.blazebit.persistence.testsuite.base.jpa.category.NoMySQL; import com.blazebit.persistence.testsuite.base.jpa.category.NoOracle; import com.blazebit.persistence.testsuite.tx.TxVoidWork; @@ -19,15 +20,15 @@ import org.junit.Test; import org.junit.experimental.categories.Category; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.EntityManager; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.ManyToOne; -import javax.persistence.OneToMany; -import javax.persistence.OrderBy; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.EntityManager; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.OneToMany; +import jakarta.persistence.OrderBy; import java.util.List; import static org.hibernate.Hibernate.initialize; @@ -148,7 +149,7 @@ public static class NodeCTE { @Entity(name = "Node") @FilterDef(name = "NodeFilter", defaultCondition = "filtering_value = :mySuperValue", parameters = { - @ParamDef(name = "mySuperValue", type = "boolean") + @ParamDef(name = "mySuperValue", type = Boolean.class) }) public static class Node { diff --git a/core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/CollectionJoinTestHibernate.java b/core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/CollectionJoinTestHibernate.java similarity index 92% rename from core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/CollectionJoinTestHibernate.java rename to core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/CollectionJoinTestHibernate.java index 2712e79088..7383714013 100644 --- a/core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/CollectionJoinTestHibernate.java +++ b/core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/CollectionJoinTestHibernate.java @@ -3,9 +3,10 @@ * Copyright Blazebit */ -package com.blazebit.persistence.testsuite; +package com.blazebit.persistence.testsuite.hibernate; import com.blazebit.persistence.CriteriaBuilder; +import com.blazebit.persistence.testsuite.AbstractCoreTest; import com.blazebit.persistence.testsuite.entity.*; import org.junit.Test; diff --git a/core/testsuite/src/test/hibernateold/com/blazebit/persistence/testsuite/CustomFunctionTest.java b/core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/CustomFunctionTest.java similarity index 61% rename from core/testsuite/src/test/hibernateold/com/blazebit/persistence/testsuite/CustomFunctionTest.java rename to core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/CustomFunctionTest.java index 92151d51b1..0ff56e05fe 100644 --- a/core/testsuite/src/test/hibernateold/com/blazebit/persistence/testsuite/CustomFunctionTest.java +++ b/core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/CustomFunctionTest.java @@ -4,26 +4,30 @@ * Copyright Blazebit */ -package com.blazebit.persistence.testsuite; +package com.blazebit.persistence.testsuite.hibernate; + +import java.util.Properties; + +import org.hibernate.boot.model.FunctionContributions; +import org.hibernate.dialect.H2Dialect; +import org.hibernate.query.sqm.function.SqmFunctionRegistry; +import org.hibernate.query.sqm.produce.function.StandardFunctionReturnTypeResolvers; +import org.hibernate.type.BasicType; + +import org.junit.Assert; +import org.junit.Test; +import org.junit.experimental.categories.Category; import com.blazebit.persistence.spi.CriteriaBuilderConfiguration; import com.blazebit.persistence.spi.JpqlFunctionGroup; +import com.blazebit.persistence.testsuite.AbstractCoreTest; import com.blazebit.persistence.testsuite.base.jpa.category.NoDB2; import com.blazebit.persistence.testsuite.base.jpa.category.NoMSSQL; import com.blazebit.persistence.testsuite.base.jpa.category.NoMySQL; -import com.blazebit.persistence.testsuite.base.jpa.category.NoMySQLOld; import com.blazebit.persistence.testsuite.base.jpa.category.NoOracle; import com.blazebit.persistence.testsuite.base.jpa.category.NoPostgreSQL; -import org.hibernate.dialect.H2Dialect; -import org.hibernate.dialect.function.SQLFunctionTemplate; -import org.hibernate.type.LongType; -import org.junit.Assert; -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import javax.persistence.Entity; -import javax.persistence.Id; -import java.util.Properties; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; /** * @author Jan-Willem Gmelig Meyling @@ -43,7 +47,7 @@ public static class BasicEntity { } @Test - @Category({NoMSSQL.class, NoMySQL.class, NoMySQLOld.class, NoPostgreSQL.class, NoOracle.class, NoDB2.class}) + @Category({NoMSSQL.class, NoMySQL.class, NoPostgreSQL.class, NoOracle.class, NoDB2.class}) public void implicitJoinCustomAggregateFunction() { String queryString = cbf.create(em, BasicEntity.class, "b") .select("addone(b.id)") @@ -69,9 +73,17 @@ protected Properties applyProperties(Properties properties) { } public static class ExtendedDialect extends H2Dialect { - public ExtendedDialect() { - registerFunction("ADDONE", new SQLFunctionTemplate(LongType.INSTANCE, "?1 + 1")); - registerFunction("CUSTOMSUM", new SQLFunctionTemplate(LongType.INSTANCE, "SUM(?1)")); + @Override + public void initializeFunctionRegistry(FunctionContributions functionContributions) { + super.initializeFunctionRegistry( functionContributions ); + SqmFunctionRegistry functionRegistry = functionContributions.getFunctionRegistry(); + BasicType longType = functionContributions.getTypeConfiguration().getBasicTypeForJavaType(Long.class); + functionRegistry.patternDescriptorBuilder("ADDONE", "?1 + 1") + .setReturnTypeResolver(StandardFunctionReturnTypeResolvers.invariant(longType)) + .register(); + functionRegistry.patternDescriptorBuilder("CUSTOMSUM", "SUM(?1)") + .setReturnTypeResolver(StandardFunctionReturnTypeResolvers.invariant(longType)) + .register(); } } diff --git a/core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/DereferenceManyToOneAssociationInJoinedInheritanceHierarchyTest.java b/core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/DereferenceManyToOneAssociationInJoinedInheritanceHierarchyTest.java similarity index 85% rename from core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/DereferenceManyToOneAssociationInJoinedInheritanceHierarchyTest.java rename to core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/DereferenceManyToOneAssociationInJoinedInheritanceHierarchyTest.java index 31cd614e94..7d2ccca3a6 100644 --- a/core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/DereferenceManyToOneAssociationInJoinedInheritanceHierarchyTest.java +++ b/core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/DereferenceManyToOneAssociationInJoinedInheritanceHierarchyTest.java @@ -3,29 +3,25 @@ * Copyright Blazebit */ -package com.blazebit.persistence.testsuite; +package com.blazebit.persistence.testsuite.hibernate; import com.blazebit.persistence.CriteriaBuilder; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate42; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate43; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate50; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate51; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate52; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate53; -import org.hibernate.annotations.ForeignKey; +import com.blazebit.persistence.testsuite.AbstractCoreTest; import org.junit.Assume; import org.junit.Before; import org.junit.Test; -import org.junit.experimental.categories.Category; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.Id; -import javax.persistence.Inheritance; -import javax.persistence.InheritanceType; -import javax.persistence.ManyToOne; -import javax.persistence.Tuple; + +import jakarta.persistence.Column; +import jakarta.persistence.ConstraintMode; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.ForeignKey; +import jakarta.persistence.Id; +import jakarta.persistence.Inheritance; +import jakarta.persistence.InheritanceType; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.Tuple; import java.util.List; import java.util.Properties; @@ -68,10 +64,6 @@ public void setUp() { } @Test - @Category({ - // Although unused, this test dependent on the availability of group join support introduced in Hibernate 5.2.8 - NoHibernate42.class, NoHibernate43.class, NoHibernate51.class - }) public void testRootTypeJoinWithGroupJoins() { Assume.assumeTrue(supportsTableGroupJoins()); @@ -110,10 +102,6 @@ public void testRootTypeJoinWithGroupJoins() { } @Test - @Category({ - NoHibernate50.class, NoHibernate43.class, NoHibernate42.class, // Entity join required for fallback - NoHibernate52.class, NoHibernate53.class // Optimize with group joins instead - }) public void testRootTypeJoinWithoutGroupJoins() { Assume.assumeFalse(supportsTableGroupJoins()); @@ -166,10 +154,6 @@ public void testRootTypeJoinWithoutGroupJoins() { } @Test - @Category({ - // This test requires group joins introduced in Hibernate 5.2.8 - NoHibernate42.class, NoHibernate43.class, NoHibernate51.class - }) public void testSubTypeJoinWithTableGroupJoins() { Assume.assumeTrue(supportsTableGroupJoins()); @@ -208,10 +192,6 @@ public void testSubTypeJoinWithTableGroupJoins() { } @Test - @Category({ - NoHibernate50.class, NoHibernate43.class, NoHibernate42.class, // Entity join required for fallback - NoHibernate52.class, NoHibernate53.class // Optimize with group joins instead - }) public void testSubTypeJoinWithoutTableGroupJoins() { Assume.assumeFalse(supportsTableGroupJoins()); Assume.assumeTrue(jpaProvider.supportsEntityJoin()); @@ -266,7 +246,7 @@ public static class Super { @Column Long id; - @ForeignKey(name = "none") + @JoinColumn(foreignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT)) @ManyToOne(targetEntity = Super.class, fetch = FetchType.LAZY) SubType parent; diff --git a/core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/EmbeddableIdComplexTest.java b/core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/EmbeddableIdComplexTest.java similarity index 91% rename from core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/EmbeddableIdComplexTest.java rename to core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/EmbeddableIdComplexTest.java index c1ffbb246e..7f344a0caa 100644 --- a/core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/EmbeddableIdComplexTest.java +++ b/core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/EmbeddableIdComplexTest.java @@ -3,14 +3,15 @@ * Copyright Blazebit */ -package com.blazebit.persistence.testsuite; +package com.blazebit.persistence.testsuite.hibernate; import com.blazebit.persistence.CriteriaBuilder; +import com.blazebit.persistence.testsuite.AbstractCoreTest; import com.blazebit.persistence.testsuite.entity.IntIdEntity; -import com.blazebit.persistence.testsuite.hibernate.EmbeddableIdTestEntity; +import com.blazebit.persistence.testsuite.hibernate.entity.EmbeddableIdTestEntity; import org.junit.Test; -import javax.persistence.Tuple; +import jakarta.persistence.Tuple; import static org.junit.Assert.assertEquals; diff --git a/core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/EnversTest.java b/core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/EnversTest.java similarity index 73% rename from core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/EnversTest.java rename to core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/EnversTest.java index 2f4e4bd603..13562287d9 100644 --- a/core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/EnversTest.java +++ b/core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/EnversTest.java @@ -3,26 +3,25 @@ * Copyright Blazebit */ -package com.blazebit.persistence.testsuite; - -import com.blazebit.persistence.parser.EntityMetamodel; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate42; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate43; -import org.hibernate.envers.Audited; -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.ManyToMany; -import javax.persistence.ManyToOne; -import javax.persistence.Table; -import javax.persistence.metamodel.EntityType; +package com.blazebit.persistence.testsuite.hibernate; import java.util.List; import java.util.Map; import java.util.Set; +import org.hibernate.envers.Audited; + +import org.junit.Test; + +import com.blazebit.persistence.parser.EntityMetamodel; +import com.blazebit.persistence.testsuite.AbstractCoreTest; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.ManyToMany; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.Table; +import jakarta.persistence.metamodel.EntityType; + import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; @@ -38,10 +37,7 @@ protected Class[] getEntityClasses() { return new Class[]{ A.class }; } - // NOTE: Hibernate 4.2 and 4.3 do very strange things to the JPA entity name and also register the audited entities only via the FQN + _AUD - // At some point we might fix that in the JoinManager to output compatible HQL, but for now, we just ignore it @Test - @Category({ NoHibernate42.class, NoHibernate43.class }) public void selectEnversEntity() { EntityMetamodel metamodel = cbf.getService(EntityMetamodel.class); EntityType auditedEntity = getAuditedEntity(metamodel, A.class); diff --git a/core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/FullJoinTest.java b/core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/FullJoinTest.java similarity index 91% rename from core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/FullJoinTest.java rename to core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/FullJoinTest.java index 470b960e00..f1efa29584 100644 --- a/core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/FullJoinTest.java +++ b/core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/FullJoinTest.java @@ -3,30 +3,27 @@ * Copyright Blazebit */ -package com.blazebit.persistence.testsuite; +package com.blazebit.persistence.testsuite.hibernate; + +import java.util.List; -import com.blazebit.persistence.CriteriaBuilder; -import com.blazebit.persistence.JoinType; -import com.blazebit.persistence.PaginatedCriteriaBuilder; -import com.blazebit.persistence.testsuite.base.jpa.category.NoH2; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate42; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate43; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate50; -import com.blazebit.persistence.testsuite.base.jpa.category.NoMySQL; -import com.blazebit.persistence.testsuite.base.jpa.category.NoMySQLOld; import org.junit.Assume; import org.junit.Before; import org.junit.Test; import org.junit.experimental.categories.Category; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.ManyToOne; -import javax.persistence.Tuple; -import java.util.List; +import com.blazebit.persistence.CriteriaBuilder; +import com.blazebit.persistence.JoinType; +import com.blazebit.persistence.PaginatedCriteriaBuilder; +import com.blazebit.persistence.testsuite.AbstractCoreTest; +import com.blazebit.persistence.testsuite.base.jpa.category.NoH2; +import com.blazebit.persistence.testsuite.base.jpa.category.NoMySQL; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.Tuple; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; @@ -38,7 +35,7 @@ * @author Jan-Willem Gmelig Meyling * @since 1.4.0 */ -@Category({NoH2.class, NoMySQL.class, NoMySQLOld.class, NoHibernate.class, NoHibernate42.class, NoHibernate43.class, NoHibernate50.class}) +@Category({NoH2.class, NoMySQL.class}) public class FullJoinTest extends AbstractCoreTest { @Before diff --git a/core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/IgnoreNotFoundDereferenceTest.java b/core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/IgnoreNotFoundDereferenceTest.java similarity index 80% rename from core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/IgnoreNotFoundDereferenceTest.java rename to core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/IgnoreNotFoundDereferenceTest.java index 8db53a5814..b2da63fc17 100644 --- a/core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/IgnoreNotFoundDereferenceTest.java +++ b/core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/IgnoreNotFoundDereferenceTest.java @@ -3,17 +3,18 @@ * Copyright Blazebit */ -package com.blazebit.persistence.testsuite; +package com.blazebit.persistence.testsuite.hibernate; import org.hibernate.annotations.NotFound; import org.hibernate.annotations.NotFoundAction; import org.junit.Test; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.ManyToOne; +import com.blazebit.persistence.testsuite.AbstractCoreTest; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.ManyToOne; /** * @author Jan-Willem Gmelig Meyling diff --git a/core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/Issue1000Test.java b/core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/Issue1000Test.java similarity index 73% rename from core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/Issue1000Test.java rename to core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/Issue1000Test.java index 4882e55770..09434975ac 100644 --- a/core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/Issue1000Test.java +++ b/core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/Issue1000Test.java @@ -3,26 +3,23 @@ * Copyright Blazebit */ -package com.blazebit.persistence.testsuite; +package com.blazebit.persistence.testsuite.hibernate; + +import org.junit.Test; import com.blazebit.persistence.CTE; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate42; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate43; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate50; +import com.blazebit.persistence.testsuite.AbstractCoreTest; import com.blazebit.persistence.testsuite.entity.LongSequenceEntity; import com.blazebit.persistence.testsuite.tx.TxVoidWork; -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import javax.persistence.Entity; -import javax.persistence.EntityManager; -import javax.persistence.Tuple; +import jakarta.persistence.Entity; +import jakarta.persistence.EntityManager; +import jakarta.persistence.Tuple; /** * @author Jan-Willem Gmelig Meyling * @since 1.4.1 */ -public class Issue1000Test extends AbstractCoreTest { +public class Issue1000Test extends AbstractCoreTest { @Override protected Class[] getEntityClasses() { @@ -44,9 +41,6 @@ public static class CorrelatedTimer extends LongSequenceEntity {} public static class Timer extends LongSequenceEntity {} @Test - @Category({ - NoHibernate50.class, NoHibernate43.class, NoHibernate42.class, // Entity join required for fallback - }) public void testCorrelation() { transactional(new TxVoidWork() { @Override diff --git a/core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/Issue1154Test.java b/core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/Issue1154Test.java similarity index 72% rename from core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/Issue1154Test.java rename to core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/Issue1154Test.java index d0c8735cff..8df6e376e1 100644 --- a/core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/Issue1154Test.java +++ b/core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/Issue1154Test.java @@ -3,25 +3,18 @@ * Copyright Blazebit */ -package com.blazebit.persistence.testsuite; +package com.blazebit.persistence.testsuite.hibernate; import com.blazebit.persistence.CriteriaBuilder; -import com.blazebit.persistence.testsuite.tx.TxVoidWork; -import org.hibernate.annotations.Generated; -import org.hibernate.annotations.GenerationTime; -import org.hibernate.annotations.Subselect; +import com.blazebit.persistence.testsuite.AbstractCoreTest; + import org.junit.Ignore; import org.junit.Test; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.EntityManager; -import javax.persistence.Id; -import javax.persistence.ManyToOne; -import javax.persistence.OneToOne; -import javax.persistence.PrimaryKeyJoinColumn; -import javax.persistence.Table; -import java.util.List; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.Table; import static org.junit.Assert.assertEquals; diff --git a/core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/Issue1167Test.java b/core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/Issue1167Test.java similarity index 75% rename from core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/Issue1167Test.java rename to core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/Issue1167Test.java index c39cfeaff4..36ede7974f 100644 --- a/core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/Issue1167Test.java +++ b/core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/Issue1167Test.java @@ -3,15 +3,16 @@ * Copyright Blazebit */ -package com.blazebit.persistence.testsuite; +package com.blazebit.persistence.testsuite.hibernate; import org.hibernate.annotations.Where; import org.junit.Test; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.ManyToOne; +import com.blazebit.persistence.testsuite.AbstractCoreTest; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.ManyToOne; /** * @author Christian Beikov diff --git a/core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/Issue1436Test.java b/core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/Issue1436Test.java similarity index 85% rename from core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/Issue1436Test.java rename to core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/Issue1436Test.java index cccd6195d8..0e23cfc5ce 100644 --- a/core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/Issue1436Test.java +++ b/core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/Issue1436Test.java @@ -3,16 +3,17 @@ * Copyright Blazebit */ -package com.blazebit.persistence.testsuite; +package com.blazebit.persistence.testsuite.hibernate; import com.blazebit.persistence.parser.EntityMetamodel; import com.blazebit.persistence.spi.ExtendedAttribute; import com.blazebit.persistence.spi.ExtendedManagedType; import org.junit.Test; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.ManyToOne; +import com.blazebit.persistence.testsuite.AbstractCoreTest; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.ManyToOne; import java.io.Serializable; import static org.junit.Assert.assertEquals; diff --git a/core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/Issue1704Test.java b/core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/Issue1704Test.java similarity index 69% rename from core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/Issue1704Test.java rename to core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/Issue1704Test.java index 8b83111893..257a1a7377 100644 --- a/core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/Issue1704Test.java +++ b/core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/Issue1704Test.java @@ -3,32 +3,28 @@ * Copyright Blazebit */ -package com.blazebit.persistence.testsuite; +package com.blazebit.persistence.testsuite.hibernate; -import com.blazebit.persistence.CriteriaBuilder; -import com.blazebit.persistence.testsuite.base.jpa.category.NoDatanucleus4; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate42; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate43; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate50; -import com.blazebit.persistence.testsuite.base.jpa.category.NoMySQLOld; -import com.blazebit.persistence.testsuite.base.jpa.category.NoOpenJPA; -import com.blazebit.persistence.testsuite.tx.TxVoidWork; -import org.hibernate.annotations.Where; -import org.junit.Assert; -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import javax.persistence.Entity; -import javax.persistence.EntityManager; -import javax.persistence.FetchType; -import javax.persistence.Id; -import javax.persistence.ManyToOne; -import javax.persistence.OneToMany; -import javax.persistence.Tuple; import java.util.HashSet; import java.util.List; import java.util.Set; +import org.hibernate.annotations.Where; + +import org.junit.Assert; +import org.junit.Test; + +import com.blazebit.persistence.CriteriaBuilder; +import com.blazebit.persistence.testsuite.AbstractCoreTest; +import com.blazebit.persistence.testsuite.tx.TxVoidWork; +import jakarta.persistence.Entity; +import jakarta.persistence.EntityManager; +import jakarta.persistence.FetchType; +import jakarta.persistence.Id; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.OneToMany; +import jakarta.persistence.Tuple; + /** * @author Christian Beikov * @since 1.6.10 @@ -42,10 +38,7 @@ protected Class[] getEntityClasses() { }; } - // NOTE: Old MySQL do not support lateral joins - // NOTE: Requires entity joins which are supported since Hibernate 5.1, Datanucleus 5 and latest Eclipselink @Test - @Category({ NoMySQLOld.class, NoHibernate42.class, NoHibernate43.class, NoHibernate50.class, NoDatanucleus4.class, NoOpenJPA.class }) public void testLateralLimit() { transactional(new TxVoidWork() { @Override diff --git a/core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/Issue1713Test.java b/core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/Issue1713Test.java similarity index 83% rename from core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/Issue1713Test.java rename to core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/Issue1713Test.java index 47ad7a4789..89320c5882 100644 --- a/core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/Issue1713Test.java +++ b/core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/Issue1713Test.java @@ -3,9 +3,10 @@ * Copyright Blazebit */ -package com.blazebit.persistence.testsuite; +package com.blazebit.persistence.testsuite.hibernate; import com.blazebit.persistence.CTE; +import com.blazebit.persistence.testsuite.AbstractCoreTest; import com.blazebit.persistence.testsuite.entity.Document; import com.blazebit.persistence.testsuite.entity.IntIdEntity; import com.blazebit.persistence.testsuite.entity.NameObject; @@ -13,10 +14,10 @@ import com.blazebit.persistence.testsuite.entity.Version; import org.junit.Test; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.OneToOne; -import javax.persistence.PrimaryKeyJoinColumn; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.OneToOne; +import jakarta.persistence.PrimaryKeyJoinColumn; /** * @author Christian Beikov diff --git a/core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/Issue227Test.java b/core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/Issue227Test.java similarity index 93% rename from core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/Issue227Test.java rename to core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/Issue227Test.java index e45904b5c5..9388dc0b8f 100644 --- a/core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/Issue227Test.java +++ b/core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/Issue227Test.java @@ -3,10 +3,11 @@ * Copyright Blazebit */ -package com.blazebit.persistence.testsuite; +package com.blazebit.persistence.testsuite.hibernate; import com.blazebit.persistence.CTE; import com.blazebit.persistence.CriteriaBuilder; +import com.blazebit.persistence.testsuite.AbstractCoreTest; import com.blazebit.persistence.testsuite.base.jpa.category.NoMySQL; import com.blazebit.persistence.testsuite.base.jpa.category.NoOracle; import com.blazebit.persistence.testsuite.tx.TxVoidWork; @@ -17,18 +18,18 @@ import org.junit.Test; import org.junit.experimental.categories.Category; -import javax.persistence.Basic; -import javax.persistence.Entity; -import javax.persistence.EntityManager; -import javax.persistence.FetchType; -import javax.persistence.GeneratedValue; -import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.JoinTable; -import javax.persistence.ManyToMany; -import javax.persistence.ManyToOne; -import javax.persistence.OneToMany; -import javax.persistence.Table; +import jakarta.persistence.Basic; +import jakarta.persistence.Entity; +import jakarta.persistence.EntityManager; +import jakarta.persistence.FetchType; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.Id; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.JoinTable; +import jakarta.persistence.ManyToMany; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.OneToMany; +import jakarta.persistence.Table; import java.util.HashSet; import java.util.List; import java.util.Set; diff --git a/core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/Issue336HibernateTest.java b/core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/Issue336HibernateTest.java similarity index 86% rename from core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/Issue336HibernateTest.java rename to core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/Issue336HibernateTest.java index 8435271502..4de2f9e4f9 100644 --- a/core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/Issue336HibernateTest.java +++ b/core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/Issue336HibernateTest.java @@ -3,21 +3,22 @@ * Copyright Blazebit */ -package com.blazebit.persistence.testsuite; +package com.blazebit.persistence.testsuite.hibernate; import com.blazebit.persistence.CriteriaBuilder; +import com.blazebit.persistence.testsuite.AbstractCoreTest; import com.blazebit.persistence.testsuite.tx.TxVoidWork; import org.hibernate.annotations.Formula; import org.junit.Assert; import org.junit.Before; import org.junit.Test; -import javax.persistence.Basic; -import javax.persistence.Entity; -import javax.persistence.EntityManager; -import javax.persistence.GeneratedValue; -import javax.persistence.Id; -import javax.persistence.Table; +import jakarta.persistence.Basic; +import jakarta.persistence.Entity; +import jakarta.persistence.EntityManager; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.Id; +import jakarta.persistence.Table; import java.util.List; /** diff --git a/core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/Issue519Test.java b/core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/Issue519Test.java similarity index 86% rename from core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/Issue519Test.java rename to core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/Issue519Test.java index dfc428b717..141c5e27c7 100644 --- a/core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/Issue519Test.java +++ b/core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/Issue519Test.java @@ -3,22 +3,23 @@ * Copyright Blazebit */ -package com.blazebit.persistence.testsuite; +package com.blazebit.persistence.testsuite.hibernate; import com.blazebit.persistence.CriteriaBuilder; +import com.blazebit.persistence.testsuite.AbstractCoreTest; import com.blazebit.persistence.testsuite.tx.TxVoidWork; import org.hibernate.annotations.Generated; import org.hibernate.annotations.GenerationTime; import org.hibernate.annotations.Subselect; import org.junit.Test; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.EntityManager; -import javax.persistence.Id; -import javax.persistence.OneToOne; -import javax.persistence.PrimaryKeyJoinColumn; -import javax.persistence.Table; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.EntityManager; +import jakarta.persistence.Id; +import jakarta.persistence.OneToOne; +import jakarta.persistence.PrimaryKeyJoinColumn; +import jakarta.persistence.Table; import java.util.List; import static org.junit.Assert.assertEquals; diff --git a/core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/Issue546Test.java b/core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/Issue546Test.java similarity index 78% rename from core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/Issue546Test.java rename to core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/Issue546Test.java index affc1a1406..f41f81ba5a 100644 --- a/core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/Issue546Test.java +++ b/core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/Issue546Test.java @@ -3,21 +3,21 @@ * Copyright Blazebit */ -package com.blazebit.persistence.testsuite; +package com.blazebit.persistence.testsuite.hibernate; import com.blazebit.persistence.CTE; -import com.blazebit.persistence.Criteria; -import com.blazebit.persistence.spi.CriteriaBuilderConfiguration; + import org.hibernate.annotations.Formula; import org.junit.Assert; import org.junit.Test; -import javax.persistence.Basic; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.Id; -import javax.persistence.PersistenceException; -import javax.persistence.Table; +import com.blazebit.persistence.testsuite.AbstractCoreTest; +import jakarta.persistence.Basic; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.Id; +import jakarta.persistence.PersistenceException; +import jakarta.persistence.Table; /** * @author Christian beikov diff --git a/core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/Issue666Test.java b/core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/Issue666Test.java similarity index 86% rename from core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/Issue666Test.java rename to core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/Issue666Test.java index 70b2b0b2df..2aa8d14c76 100644 --- a/core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/Issue666Test.java +++ b/core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/Issue666Test.java @@ -3,19 +3,20 @@ * Copyright Blazebit */ -package com.blazebit.persistence.testsuite; +package com.blazebit.persistence.testsuite.hibernate; +import com.blazebit.persistence.testsuite.AbstractCoreTest; import com.blazebit.persistence.testsuite.base.jpa.category.NoDB2; import com.blazebit.persistence.testsuite.tx.TxVoidWork; import org.junit.Test; import org.junit.experimental.categories.Category; -import javax.persistence.Entity; -import javax.persistence.EntityManager; -import javax.persistence.Id; -import javax.persistence.IdClass; -import javax.persistence.ManyToOne; -import javax.persistence.Tuple; +import jakarta.persistence.Entity; +import jakarta.persistence.EntityManager; +import jakarta.persistence.Id; +import jakarta.persistence.IdClass; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.Tuple; import java.io.Serializable; /** diff --git a/core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/Issue950Test.java b/core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/Issue950Test.java similarity index 91% rename from core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/Issue950Test.java rename to core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/Issue950Test.java index dbf7612036..4af1e58006 100644 --- a/core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/Issue950Test.java +++ b/core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/Issue950Test.java @@ -3,30 +3,25 @@ * Copyright Blazebit */ -package com.blazebit.persistence.testsuite; +package com.blazebit.persistence.testsuite.hibernate; +import com.blazebit.persistence.testsuite.AbstractCoreTest; import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate42; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate43; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate50; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate51; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate52; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate53; import com.blazebit.persistence.testsuite.tx.TxVoidWork; import org.junit.Before; import org.junit.Test; import org.junit.experimental.categories.Category; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.EntityManager; -import javax.persistence.Id; -import javax.persistence.ManyToOne; -import javax.persistence.MappedSuperclass; -import javax.persistence.OneToOne; -import javax.persistence.PrimaryKeyJoinColumn; -import javax.persistence.Table; -import javax.persistence.Tuple; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.EntityManager; +import jakarta.persistence.Id; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.MappedSuperclass; +import jakarta.persistence.OneToOne; +import jakarta.persistence.PrimaryKeyJoinColumn; +import jakarta.persistence.Table; +import jakarta.persistence.Tuple; import java.util.List; import static org.junit.Assert.assertEquals; @@ -164,9 +159,7 @@ public void work(EntityManager em) { }); } - // NOTE: Requires Entity joins @Test - @Category({ NoHibernate42.class, NoHibernate43.class, NoHibernate50.class }) public void testJoinOrderWithRightJoin() { transactional(new TxVoidWork() { @Override @@ -206,7 +199,7 @@ public void work(EntityManager em) { // NOTE: Hibernate currently doesn't fully respect the join order, but just renders association joins first @Test - @Category({ NoHibernate42.class, NoHibernate43.class, NoHibernate50.class, NoHibernate51.class, NoHibernate52.class, NoHibernate53.class, NoHibernate.class }) + @Category({ NoHibernate.class }) public void testJoinOrderWithRightNormalJoin() { transactional(new TxVoidWork() { @Override @@ -244,9 +237,7 @@ public void work(EntityManager em) { }); } - // NOTE: Requires Entity joins @Test - @Category({ NoHibernate42.class, NoHibernate43.class, NoHibernate50.class }) public void testJoinOrderWithRightJoinWithIdDereference() { transactional(new TxVoidWork() { @Override @@ -295,7 +286,7 @@ public void work(EntityManager em) { // NOTE: Hibernate currently doesn't fully respect the join order, but just renders association joins first @Test - @Category({ NoHibernate42.class, NoHibernate43.class, NoHibernate50.class, NoHibernate51.class, NoHibernate52.class, NoHibernate53.class, NoHibernate.class }) + @Category({ NoHibernate.class }) public void testJoinOrderWithRightNormalJoinWithIdDereference() { transactional(new TxVoidWork() { @Override @@ -342,9 +333,7 @@ public void work(EntityManager em) { }); } - // NOTE: Requires Entity joins @Test - @Category({ NoHibernate42.class, NoHibernate43.class, NoHibernate50.class }) public void testJoinOrderWithRightJoinWithInnerImplicitJoins() { transactional(new TxVoidWork() { @Override @@ -393,7 +382,7 @@ public void work(EntityManager em) { // NOTE: Hibernate currently doesn't fully respect the join order, but just renders association joins first @Test - @Category({ NoHibernate42.class, NoHibernate43.class, NoHibernate50.class, NoHibernate51.class, NoHibernate52.class, NoHibernate53.class, NoHibernate.class }) + @Category({ NoHibernate.class }) public void testJoinOrderWithRightNormalJoinWithInnerImplicitJoins() { transactional(new TxVoidWork() { @Override @@ -440,9 +429,7 @@ public void work(EntityManager em) { }); } - // NOTE: Requires Entity joins @Test - @Category({ NoHibernate42.class, NoHibernate43.class, NoHibernate50.class }) public void testJoinOrderWithRightJoinWithNonOptionalAssociationProjections() { transactional(new TxVoidWork() { @Override @@ -486,7 +473,7 @@ public void work(EntityManager em) { // NOTE: Hibernate currently doesn't fully respect the join order, but just renders association joins first @Test - @Category({ NoHibernate42.class, NoHibernate43.class, NoHibernate50.class, NoHibernate51.class, NoHibernate52.class, NoHibernate53.class, NoHibernate.class }) + @Category({ NoHibernate.class }) public void testJoinOrderWithRightNormalJoinWithNonOptionalAssociationProjections() { transactional(new TxVoidWork() { @Override diff --git a/core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/Issue969Test.java b/core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/Issue969Test.java similarity index 88% rename from core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/Issue969Test.java rename to core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/Issue969Test.java index e2de006d04..221ea9afea 100644 --- a/core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/Issue969Test.java +++ b/core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/Issue969Test.java @@ -3,14 +3,15 @@ * Copyright Blazebit */ -package com.blazebit.persistence.testsuite; +package com.blazebit.persistence.testsuite.hibernate; import org.junit.Test; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.IdClass; -import javax.persistence.ManyToOne; +import com.blazebit.persistence.testsuite.AbstractCoreTest; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.IdClass; +import jakarta.persistence.ManyToOne; import java.io.Serializable; /** diff --git a/core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/QuotedIdentifiersTest.java b/core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/QuotedIdentifiersTest.java similarity index 88% rename from core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/QuotedIdentifiersTest.java rename to core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/QuotedIdentifiersTest.java index 33ad8f4b20..133ba1d934 100644 --- a/core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/QuotedIdentifiersTest.java +++ b/core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/QuotedIdentifiersTest.java @@ -3,13 +3,15 @@ * Copyright Blazebit */ -package com.blazebit.persistence.testsuite; +package com.blazebit.persistence.testsuite.hibernate; import org.junit.Test; import java.util.Arrays; import java.util.Properties; +import com.blazebit.persistence.testsuite.AbstractCoreTest; + import static org.junit.Assert.assertEquals; /** diff --git a/core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/hibernate/EmbeddableIdTestEntity.java b/core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/entity/EmbeddableIdTestEntity.java similarity index 80% rename from core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/hibernate/EmbeddableIdTestEntity.java rename to core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/entity/EmbeddableIdTestEntity.java index fa6ab7ab5e..ef13c83d98 100644 --- a/core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/hibernate/EmbeddableIdTestEntity.java +++ b/core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/entity/EmbeddableIdTestEntity.java @@ -3,12 +3,12 @@ * Copyright Blazebit */ -package com.blazebit.persistence.testsuite.hibernate; +package com.blazebit.persistence.testsuite.hibernate.entity; -import javax.persistence.Embedded; -import javax.persistence.EmbeddedId; -import javax.persistence.Entity; -import javax.persistence.Table; +import jakarta.persistence.Embedded; +import jakarta.persistence.EmbeddedId; +import jakarta.persistence.Entity; +import jakarta.persistence.Table; import java.io.Serializable; @Entity diff --git a/core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/hibernate/EmbeddableIdTestEntityEmbeddable.java b/core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/entity/EmbeddableIdTestEntityEmbeddable.java similarity index 97% rename from core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/hibernate/EmbeddableIdTestEntityEmbeddable.java rename to core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/entity/EmbeddableIdTestEntityEmbeddable.java index 6a82edcfe9..9612bb228b 100644 --- a/core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/hibernate/EmbeddableIdTestEntityEmbeddable.java +++ b/core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/entity/EmbeddableIdTestEntityEmbeddable.java @@ -3,12 +3,12 @@ * Copyright Blazebit */ -package com.blazebit.persistence.testsuite.hibernate; +package com.blazebit.persistence.testsuite.hibernate.entity; import com.blazebit.persistence.testsuite.entity.IntIdEntity; import com.blazebit.persistence.testsuite.entity.NameObject; -import javax.persistence.*; +import jakarta.persistence.*; import java.io.Serializable; import java.util.HashMap; import java.util.HashSet; diff --git a/core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/hibernate/EmbeddableIdTestEntityId.java b/core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/entity/EmbeddableIdTestEntityId.java similarity index 96% rename from core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/hibernate/EmbeddableIdTestEntityId.java rename to core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/entity/EmbeddableIdTestEntityId.java index 34708ba9ac..cc9f9449cb 100644 --- a/core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/hibernate/EmbeddableIdTestEntityId.java +++ b/core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/entity/EmbeddableIdTestEntityId.java @@ -3,12 +3,12 @@ * Copyright Blazebit */ -package com.blazebit.persistence.testsuite.hibernate; +package com.blazebit.persistence.testsuite.hibernate.entity; import com.blazebit.persistence.testsuite.entity.EmbeddableTestEntityIdEmbeddable; import com.blazebit.persistence.testsuite.entity.IntIdEntity; -import javax.persistence.*; +import jakarta.persistence.*; import java.io.Serializable; @Embeddable diff --git a/core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/hibernate/EmbeddableIdTestEntityNestedEmbeddable.java b/core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/entity/EmbeddableIdTestEntityNestedEmbeddable.java similarity index 87% rename from core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/hibernate/EmbeddableIdTestEntityNestedEmbeddable.java rename to core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/entity/EmbeddableIdTestEntityNestedEmbeddable.java index 6aa4c1e378..f259154c56 100644 --- a/core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/hibernate/EmbeddableIdTestEntityNestedEmbeddable.java +++ b/core/testsuite-hibernate/src/test/java/com/blazebit/persistence/testsuite/hibernate/entity/EmbeddableIdTestEntityNestedEmbeddable.java @@ -3,12 +3,12 @@ * Copyright Blazebit */ -package com.blazebit.persistence.testsuite.hibernate; +package com.blazebit.persistence.testsuite.hibernate.entity; -import javax.persistence.Embeddable; -import javax.persistence.JoinColumn; -import javax.persistence.JoinTable; -import javax.persistence.OneToMany; +import jakarta.persistence.Embeddable; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.JoinTable; +import jakarta.persistence.OneToMany; import java.io.Serializable; import java.util.HashSet; import java.util.Set; diff --git a/integration/spring-hateoas/webmvc-jakarta/src/test/resources/logging.properties b/core/testsuite-hibernate/src/test/resources/logging.properties similarity index 95% rename from integration/spring-hateoas/webmvc-jakarta/src/test/resources/logging.properties rename to core/testsuite-hibernate/src/test/resources/logging.properties index f4f9a66aa9..f307bc07b8 100644 --- a/integration/spring-hateoas/webmvc-jakarta/src/test/resources/logging.properties +++ b/core/testsuite-hibernate/src/test/resources/logging.properties @@ -20,6 +20,7 @@ handlers = java.util.logging.ConsoleHandler # We turn it off for TravisCI build with SEVERE org.hibernate.level = SEVERE org.hibernate.tool.hbm2ddl.level = OFF +org.hibernate.tool.schema.internal.ExceptionHandlerLoggedImpl.level = ALL #org.hibernate.SQL.level = ALL #org.hibernate.type.descriptor.sql.level = ALL #org.hibernate.tool.hbm2ddl.level = ALL diff --git a/core/testsuite-hibernate6/pom.xml b/core/testsuite-hibernate6/pom.xml deleted file mode 100644 index 3afd63f793..0000000000 --- a/core/testsuite-hibernate6/pom.xml +++ /dev/null @@ -1,842 +0,0 @@ - - - 4.0.0 - - com.blazebit - blaze-persistence-core - 1.6.15-SNAPSHOT - ../pom.xml - - - blaze-persistence-core-testsuite-hibernate6 - jar - - - - 11 - ${test.java.version} - com.blazebit.persistence.view.testsuite.hibernate6 - ${version.jakarta-jpa-api} - ${h2-2.version} - com.blazebit.persistence.testsuite - 0 - - - - - - - - ${project.groupId} - blaze-persistence-core-api-jakarta - test - - - ${project.groupId} - blaze-persistence-core-impl-jakarta - test - - - - ${project.groupId} - blaze-persistence-testsuite-base-hibernate6 - ${project.version} - compile - - - ${project.groupId} - blaze-persistence-core-testsuite-jakarta - ${project.version} - compile - - - junit - junit - test - - - - - - h2 - - true - - - - - org.apache.maven.plugins - maven-surefire-plugin - - ${test} - ${maven.test.skip} - ${surefireForkCount} - ${project.build.directory}/surefire-reports/${surefire.forkNumber} - - jdbc:h2:mem:core${surefire.forkNumber};DB_CLOSE_DELAY=-1 - admin - admin - org.h2.Driver - com.blazebit.persistence.testsuite.base.jpa.category.NoH2,com.blazebit.persistence.testsuite.base.jpa.category.NoH2Latest,${jpa.excludedGroups} - ${testBasePackage} - ${surefireForkCount} - $${surefire.forkNumber} - UTC - - - com.blazebit:blaze-persistence-core-testsuite-jakarta - - - - - org.apache.maven.surefire - surefire-junit47 - ${version.surefire.plugin} - - - - - - - - com.h2database - h2 - ${version.h2} - test - - - - - mysql - - - - org.apache.maven.plugins - maven-surefire-plugin - - ${test} - ${maven.test.skip} - ${surefireForkCount} - ${project.build.directory}/surefire-reports/${surefire.forkNumber} - - jdbc:mysql://${dbHost}:3306/information_schema?useUnicode=true&characterEncoding=utf8&databaseTerm=schema&nullDatabaseMeansCurrent=true - root - - com.mysql.jdbc.Driver - core${surefire.forkNumber} - com.blazebit.persistence.testsuite.base.jpa.category.NoMySQL,com.blazebit.persistence.testsuite.base.jpa.category.NoMySQLOld,${jpa.excludedGroups} - ${testBasePackage} - ${surefireForkCount} - $${surefire.forkNumber} - UTC - - - com.blazebit:blaze-persistence-core-testsuite-jakarta - - - - - org.apache.maven.surefire - surefire-junit47 - ${version.surefire.plugin} - - - - - - - - mysql - mysql-connector-java - test - - - - - mysql8 - - - - org.apache.maven.plugins - maven-surefire-plugin - - ${test} - ${maven.test.skip} - ${surefireForkCount} - ${project.build.directory}/surefire-reports/${surefire.forkNumber} - - jdbc:mysql://${dbHost}:3306/information_schema?useUnicode=true&characterEncoding=utf8&databaseTerm=schema&nullDatabaseMeansCurrent=true - root - - com.mysql.jdbc.Driver - core${surefire.forkNumber} - com.blazebit.persistence.testsuite.base.jpa.category.NoMySQL,${jpa.excludedGroups} - ${testBasePackage} - ${surefireForkCount} - $${surefire.forkNumber} - UTC - - - com.blazebit:blaze-persistence-core-testsuite-jakarta - - - - - org.apache.maven.surefire - surefire-junit47 - ${version.surefire.plugin} - - - - - - - - mysql - mysql-connector-java - test - - - - - postgresql - - - - org.apache.maven.plugins - maven-surefire-plugin - - ${test} - ${surefireForkCount} - ${project.build.directory}/surefire-reports/${surefire.forkNumber} - - jdbc:postgresql://${dbHost}:5432/test - postgres - postgres - org.postgresql.Driver - core${surefire.forkNumber} - com.blazebit.persistence.testsuite.base.jpa.category.NoPostgreSQL,${jpa.excludedGroups} - ${testBasePackage} - ${surefireForkCount} - $${surefire.forkNumber} - UTC - - - com.blazebit:blaze-persistence-core-testsuite-jakarta - - - - - org.apache.maven.surefire - surefire-junit47 - ${version.surefire.plugin} - - - - - - - - org.postgresql - postgresql - test - - - - - sqlite - - - - org.apache.maven.plugins - maven-surefire-plugin - - ${test} - - jdbc:sqlite:test.db - - - org.sqlite.JDBC - com.blazebit.persistence.testsuite.base.jpa.category.NoSQLite,${jpa.excludedGroups} - ${testBasePackage} - - - com.blazebit:blaze-persistence-core-testsuite-jakarta - - - - - org.apache.maven.surefire - surefire-junit47 - ${version.surefire.plugin} - - - - - - - - org.xerial - sqlite-jdbc - test - - - - - db2 - - - - org.apache.maven.plugins - maven-surefire-plugin - - ${test} - ${maven.test.skip} - ${surefireForkCount} - ${project.build.directory}/surefire-reports/${surefire.forkNumber} - - jdbc:db2://${dbHost}:50000/test - db2inst1 - db2inst1-pwd - com.ibm.db2.jcc.DB2Driver - core${surefire.forkNumber} - com.blazebit.persistence.testsuite.base.jpa.category.NoDB2,${jpa.excludedGroups} - ${testBasePackage} - ${surefireForkCount} - $${surefire.forkNumber} - UTC - - - com.blazebit:blaze-persistence-core-testsuite-jakarta - - - - - org.apache.maven.surefire - surefire-junit47 - ${version.surefire.plugin} - - - - - - - - com.ibm.db2 - jcc - 11.5.5.0 - test - - - - - firebird - - - - org.apache.maven.plugins - maven-surefire-plugin - - ${test} - - jdbc:firebirdsql:${dbHost}:/tmp/test.fdb - SYSDBA - masterkey - org.firebirdsql.jdbc.FBDriver - com.blazebit.persistence.testsuite.base.jpa.category.NoFirebird,${jpa.excludedGroups} - ${testBasePackage} - - - com.blazebit:blaze-persistence-core-testsuite-jakarta - - - - - org.apache.maven.surefire - surefire-junit47 - ${version.surefire.plugin} - - - - - - - - org.firebirdsql.jdbc - jaybird-jdk16 - test - - - - - oracle - - - - org.apache.maven.plugins - maven-surefire-plugin - - ${test} - ${maven.test.skip} - ${surefireForkCount} - ${project.build.directory}/surefire-reports/${surefire.forkNumber} - - jdbc:oracle:thin:@${dbHost}:1521:XE - SYSTEM - Oracle18 - oracle.jdbc.driver.OracleDriver - C##CORE${surefire.forkNumber} - - US - en - UTC - - - true - com.blazebit.persistence.testsuite.base.jpa.category.NoOracle,${jpa.excludedGroups} - ${testBasePackage} - ${surefireForkCount} - $${surefire.forkNumber} - - - com.blazebit:blaze-persistence-core-testsuite-jakarta - - - - - org.apache.maven.surefire - surefire-junit47 - ${version.surefire.plugin} - - - - - - - - com.oracle.database.jdbc - ojdbc8 - test - - - - - mssql - - - - org.apache.maven.plugins - maven-surefire-plugin - - ${test} - ${maven.test.skip} - ${surefireForkCount} - ${project.build.directory}/surefire-reports/${surefire.forkNumber} - - jdbc:sqlserver://${dbHost}:1433;trustServerCertificate=true - sa - Blaze-Persistence - com.microsoft.sqlserver.jdbc.SQLServerDriver - core${surefire.forkNumber} - com.blazebit.persistence.testsuite.base.jpa.category.NoMSSQL,${jpa.excludedGroups} - ${testBasePackage} - ${surefireForkCount} - $${surefire.forkNumber} - UTC - - - com.blazebit:blaze-persistence-core-testsuite-jakarta - - - - - org.apache.maven.surefire - surefire-junit47 - ${version.surefire.plugin} - - - - - - - - com.microsoft.sqlserver - mssql-jdbc - test - - - - - - - hibernate-5.6 - - com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate60 - - - - - org.hibernate - hibernate-core - ${version.hibernate-6.2} - - - org.hibernate - hibernate-envers - ${version.hibernate-6.2} - - - org.hibernate - hibernate-testing - ${version.hibernate-6.2} - - - jakarta.xml.bind - jakarta.xml.bind-api - ${version.jakarta-jaxb-api} - - - com.sun.xml.bind - jaxb-impl - ${version.jakarta-jaxb} - - - jakarta.persistence - jakarta.persistence-api - ${version.jakarta-jpa-3.1-api} - provided - - - jakarta.transaction - jakarta.transaction-api - ${version.jakarta-jta} - - - jakarta.activation - jakarta.activation-api - ${version.jakarta-activation} - - - ${project.groupId} - blaze-persistence-integration-hibernate-6.2 - test - - - - org.hibernate - hibernate-jpamodelgen - ${version.hibernate-6.2} - provided - - - - - hibernate-6.2 - - true - - - com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate60 - - - - org.hibernate - hibernate-core - ${version.hibernate-6.2} - - - org.hibernate - hibernate-envers - ${version.hibernate-6.2} - - - org.hibernate - hibernate-testing - ${version.hibernate-6.2} - - - jakarta.xml.bind - jakarta.xml.bind-api - ${version.jakarta-jaxb-api} - - - com.sun.xml.bind - jaxb-impl - ${version.jakarta-jaxb} - - - jakarta.persistence - jakarta.persistence-api - ${version.jakarta-jpa-3.1-api} - provided - - - jakarta.transaction - jakarta.transaction-api - ${version.jakarta-jta} - - - jakarta.activation - jakarta.activation-api - ${version.jakarta-activation} - - - ${project.groupId} - blaze-persistence-integration-hibernate-6.2 - test - - - - org.hibernate - hibernate-jpamodelgen - ${version.hibernate-6.2} - provided - - - - - hibernate-6.3 - - com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate60 - - - - org.hibernate - hibernate-core - ${version.hibernate-6.3} - - - org.hibernate - hibernate-envers - ${version.hibernate-6.3} - - - org.hibernate - hibernate-testing - ${version.hibernate-6.3} - - - jakarta.xml.bind - jakarta.xml.bind-api - ${version.jakarta-jaxb-api} - - - com.sun.xml.bind - jaxb-impl - ${version.jakarta-jaxb} - - - jakarta.persistence - jakarta.persistence-api - ${version.jakarta-jpa-3.1-api} - provided - - - jakarta.transaction - jakarta.transaction-api - ${version.jakarta-jta} - - - jakarta.activation - jakarta.activation-api - ${version.jakarta-activation} - - - ${project.groupId} - blaze-persistence-integration-hibernate-6.2 - test - - - - org.hibernate - hibernate-jpamodelgen - ${version.hibernate-6.3} - provided - - - - - hibernate-6.4 - - com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate60 - - - - org.hibernate - hibernate-core - ${version.hibernate-6.4} - - - org.hibernate - hibernate-envers - ${version.hibernate-6.4} - - - org.hibernate - hibernate-testing - ${version.hibernate-6.4} - - - jakarta.xml.bind - jakarta.xml.bind-api - ${version.jakarta-jaxb-api} - - - com.sun.xml.bind - jaxb-impl - ${version.jakarta-jaxb} - - - jakarta.persistence - jakarta.persistence-api - ${version.jakarta-jpa-3.1-api} - provided - - - jakarta.transaction - jakarta.transaction-api - ${version.jakarta-jta} - - - jakarta.activation - jakarta.activation-api - ${version.jakarta-activation} - - - ${project.groupId} - blaze-persistence-integration-hibernate-6.2 - test - - - - org.hibernate - hibernate-jpamodelgen - ${version.hibernate-6.4} - provided - - - - - hibernate-6.5 - - com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate60 - - - - org.hibernate - hibernate-core - ${version.hibernate-6.5} - - - org.hibernate - hibernate-envers - ${version.hibernate-6.5} - - - org.hibernate - hibernate-testing - ${version.hibernate-6.5} - - - jakarta.xml.bind - jakarta.xml.bind-api - ${version.jakarta-jaxb-api} - - - com.sun.xml.bind - jaxb-impl - ${version.jakarta-jaxb} - - - jakarta.persistence - jakarta.persistence-api - ${version.jakarta-jpa-3.1-api} - provided - - - jakarta.transaction - jakarta.transaction-api - ${version.jakarta-jta} - - - jakarta.activation - jakarta.activation-api - ${version.jakarta-activation} - - - ${project.groupId} - blaze-persistence-integration-hibernate-6.2 - test - - - - org.hibernate - hibernate-jpamodelgen - ${version.hibernate-6.5} - provided - - - - - hibernate-6.6 - - com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate60,com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate66 - - - - org.hibernate - hibernate-core - ${version.hibernate-6.6} - - - org.hibernate - hibernate-envers - ${version.hibernate-6.6} - - - org.hibernate - hibernate-testing - ${version.hibernate-6.6} - - - jakarta.xml.bind - jakarta.xml.bind-api - ${version.jakarta-jaxb-api} - - - com.sun.xml.bind - jaxb-impl - ${version.jakarta-jaxb} - - - jakarta.persistence - jakarta.persistence-api - ${version.jakarta-jpa-3.1-api} - provided - - - jakarta.transaction - jakarta.transaction-api - ${version.jakarta-jta} - - - jakarta.activation - jakarta.activation-api - ${version.jakarta-activation} - - - ${project.groupId} - blaze-persistence-integration-hibernate-6.2 - test - - - - org.hibernate - hibernate-jpamodelgen - ${version.hibernate-6.6} - provided - - - - - diff --git a/core/testsuite-jakarta/pom.xml b/core/testsuite-jakarta/pom.xml deleted file mode 100644 index 26973e6abc..0000000000 --- a/core/testsuite-jakarta/pom.xml +++ /dev/null @@ -1,298 +0,0 @@ - - - - - 4.0.0 - - - com.blazebit - blaze-persistence-core - 1.6.15-SNAPSHOT - ../pom.xml - - - blaze-persistence-core-testsuite-jakarta - jar - - - com.blazebit.persistence.core.testsuite - - - - - ${project.groupId} - blaze-persistence-core-testsuite - ${project.version} - provided - - - jakarta.persistence - jakarta.persistence-api - ${version.jakarta-jpa-api} - provided - - - ${project.groupId} - blaze-common-utils - - - ${project.groupId} - blaze-persistence-testsuite-base-hibernate6 - ${project.version} - compile - - - - - junit - junit - compile - - - - com.fasterxml.jackson.core - jackson-databind - 2.11.0 - - - - - org.mockito - mockito-core - - - ${project.groupId} - blaze-persistence-testsuite-base-assertion - ${project.version} - - - - - - - maven-antrun-plugin - - - transform-jar - package - - run - - - - - - - - - - - - - - - - - - - - - - transform-sources-jar - package - - run - - - - - - - - - - - - - - - - - - - - - - - - transform-javadoc - package - - run - - - - - - - - - - - - - - - - - - - - - - - - transform-test - package - - run - - - - - - - - - - - - - - - - - - - - - - - - - - org.eclipse.transformer - org.eclipse.transformer.cli - 0.5.0 - - - ant-contrib - ant-contrib - 1.0b3 - - - ant - ant - - - - - biz.aQute.bnd - biz.aQute.bnd.transform - ${version.bnd} - compile - - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - attach-artifacts - package - - attach-artifact - - - - - ${project.build.directory}/${project.build.finalName}-sources.jar - sources - jar - - - ${project.build.directory}/${project.build.finalName}-tests.jar - tests - jar - - - - - - - - maven-surefire-plugin - - true - - - - maven-jar-plugin - - - - test-jar - - - - - - - - - blazebit-release - - - - org.codehaus.mojo - build-helper-maven-plugin - - - attach-artifacts - package - - attach-artifact - - - - - ${project.build.directory}/${project.build.finalName}-sources.jar - sources - jar - - - ${project.build.directory}/${project.build.finalName}-tests.jar - tests - jar - - - ${project.build.directory}/${project.build.finalName}-javadoc.jar - javadoc - jar - - - - - - - - - - - - diff --git a/core/testsuite/pom.xml b/core/testsuite/pom.xml index 26e4ddad33..d4a495b336 100644 --- a/core/testsuite/pom.xml +++ b/core/testsuite/pom.xml @@ -10,7 +10,7 @@ com.blazebit blaze-persistence-core - 1.6.15-SNAPSHOT + 2.0.0-SNAPSHOT ../pom.xml @@ -20,16 +20,39 @@ Blazebit Persistence Core Testsuite - - 1.8 - ${test.java.version} com.blazebit.persistence.core.testsuite com.blazebit.persistence.testsuite 2 CoreTestsuite* + true + + jakarta.persistence + jakarta.persistence-api + provided + + + jakarta.transaction + jakarta.transaction-api + provided + + + jakarta.interceptor + jakarta.interceptor-api + provided + + + jakarta.inject + jakarta.inject-api + provided + + + jakarta.enterprise + jakarta.enterprise.cdi-api + provided + @@ -47,6 +70,11 @@ ${project.groupId} blaze-common-utils + + ${project.groupId} + blaze-persistence-entity-view-api + test + org.apache.maven.plugins @@ -65,7 +93,6 @@ com.fasterxml.jackson.core jackson-databind - 2.11.0 test @@ -80,7 +107,6 @@ ${project.version} - jakarta.xml.bind jakarta.xml.bind-api @@ -94,44 +120,31 @@ jakarta.annotation jakarta.annotation-api - ${version.annotation} + ${version.annotation-api} jakarta.activation jakarta.activation-api - ${version.activation} + ${version.activation-api} - org.moditect - moditect-maven-plugin + org.codehaus.mojo + build-helper-maven-plugin - add-module-infos - package + add-source + generate-sources - add-module-info + add-source - - - open module ${module.name} { - requires java.sql; - requires java.persistence; - requires com.blazebit.common.utils; - requires com.blazebit.persistence.core; - requires com.blazebit.persistence.core.parser; - requires com.blazebit.persistence.core.impl; - exports com.blazebit.persistence.testsuite; - exports com.blazebit.persistence.testsuite.entity; - exports com.blazebit.persistence.testsuite.treat.entity; - exports com.blazebit.persistence.testsuite.tx; - } - - + + ${additional.source.directory} + @@ -156,6 +169,7 @@ ${maven.test.skip} ${surefireForkCount} ${project.build.directory}/surefire-reports/${surefire.forkNumber} + ${useModulePath} jdbc:h2:mem:core${surefire.forkNumber};DB_CLOSE_DELAY=-1 admin @@ -166,6 +180,8 @@ ${surefireForkCount} $${surefire.forkNumber} UTC + US + en @@ -176,25 +192,6 @@ - - org.codehaus.mojo - build-helper-maven-plugin - - - add-source - generate-sources - - add-source - - - - ${additional.source.directory} - ${project.build.directory}/generated-sources/metamodel - - - - - @@ -218,68 +215,7 @@ ${maven.test.skip} ${surefireForkCount} ${project.build.directory}/surefire-reports/${surefire.forkNumber} - - jdbc:mysql://${dbHost}:3306/information_schema?useUnicode=true&characterEncoding=utf8&databaseTerm=schema&nullDatabaseMeansCurrent=true - root - - com.mysql.jdbc.Driver - core${surefire.forkNumber} - com.blazebit.persistence.testsuite.base.jpa.category.NoMySQL,com.blazebit.persistence.testsuite.base.jpa.category.NoMySQLOld,${jpa.excludedGroups} - ${testBasePackage} - ${surefireForkCount} - $${surefire.forkNumber} - UTC - - - - - org.apache.maven.surefire - surefire-junit47 - ${version.surefire.plugin} - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - add-source - generate-sources - - add-source - - - - ${additional.source.directory} - ${project.build.directory}/generated-sources/metamodel - - - - - - - - - - mysql - mysql-connector-java - test - - - - - mysql8 - - - - org.apache.maven.plugins - maven-surefire-plugin - - ${test} - ${maven.test.skip} - ${surefireForkCount} - ${project.build.directory}/surefire-reports/${surefire.forkNumber} + ${useModulePath} jdbc:mysql://${dbHost}:3306/information_schema?useUnicode=true&characterEncoding=utf8&databaseTerm=schema&nullDatabaseMeansCurrent=true root @@ -301,25 +237,6 @@ - - org.codehaus.mojo - build-helper-maven-plugin - - - add-source - generate-sources - - add-source - - - - ${additional.source.directory} - ${project.build.directory}/generated-sources/metamodel - - - - - @@ -341,6 +258,7 @@ ${test} ${surefireForkCount} ${project.build.directory}/surefire-reports/${surefire.forkNumber} + ${useModulePath} jdbc:postgresql://${dbHost}:5432/test postgres @@ -362,25 +280,6 @@ - - org.codehaus.mojo - build-helper-maven-plugin - - - add-source - generate-sources - - add-source - - - - ${additional.source.directory} - ${project.build.directory}/generated-sources/metamodel - - - - - @@ -391,61 +290,6 @@ - - sqlite - - - - org.apache.maven.plugins - maven-surefire-plugin - - ${test} - - jdbc:sqlite:test.db - - - org.sqlite.JDBC - com.blazebit.persistence.testsuite.base.jpa.category.NoSQLite,${jpa.excludedGroups} - ${testBasePackage} - - - - - org.apache.maven.surefire - surefire-junit47 - ${version.surefire.plugin} - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - add-source - generate-sources - - add-source - - - - ${additional.source.directory} - ${project.build.directory}/generated-sources/metamodel - - - - - - - - - - org.xerial - sqlite-jdbc - test - - - db2 @@ -458,6 +302,7 @@ ${maven.test.skip} ${surefireForkCount} ${project.build.directory}/surefire-reports/${surefire.forkNumber} + ${useModulePath} jdbc:db2://${dbHost}:50000/test db2inst1 @@ -479,25 +324,6 @@ - - org.codehaus.mojo - build-helper-maven-plugin - - - add-source - generate-sources - - add-source - - - - ${additional.source.directory} - ${project.build.directory}/generated-sources/metamodel - - - - - @@ -509,61 +335,6 @@ - - firebird - - - - org.apache.maven.plugins - maven-surefire-plugin - - ${test} - - jdbc:firebirdsql:${dbHost}:/tmp/test.fdb - SYSDBA - masterkey - org.firebirdsql.jdbc.FBDriver - com.blazebit.persistence.testsuite.base.jpa.category.NoFirebird,${jpa.excludedGroups} - ${testBasePackage} - - - - - org.apache.maven.surefire - surefire-junit47 - ${version.surefire.plugin} - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - add-source - generate-sources - - add-source - - - - ${additional.source.directory} - ${project.build.directory}/generated-sources/metamodel - - - - - - - - - - org.firebirdsql.jdbc - jaybird-jdk16 - test - - - oracle @@ -576,6 +347,7 @@ ${maven.test.skip} ${surefireForkCount} ${project.build.directory}/surefire-reports/${surefire.forkNumber} + ${useModulePath} jdbc:oracle:thin:@${dbHost}:1521:XE SYSTEM @@ -603,25 +375,6 @@ - - org.codehaus.mojo - build-helper-maven-plugin - - - add-source - generate-sources - - add-source - - - - ${additional.source.directory} - ${project.build.directory}/generated-sources/metamodel - - - - - @@ -644,6 +397,7 @@ ${maven.test.skip} ${surefireForkCount} ${project.build.directory}/surefire-reports/${surefire.forkNumber} + ${useModulePath} jdbc:sqlserver://${dbHost}:1433;trustServerCertificate=true sa @@ -665,25 +419,6 @@ - - org.codehaus.mojo - build-helper-maven-plugin - - - add-source - generate-sources - - add-source - - - - ${additional.source.directory} - ${project.build.directory}/generated-sources/metamodel - - - - - @@ -697,2078 +432,338 @@ - hibernate + hibernate-6.2 - com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate,com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate42 + com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate,com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate62 src/main/hibernate - org.hibernate - hibernate-entitymanager - ${version.hibernate-4.2} + org.hibernate.orm + hibernate-core + ${version.hibernate-6.2} - org.hibernate + org.hibernate.orm hibernate-envers - ${version.hibernate-4.2} + ${version.hibernate-6.2} - org.hibernate + org.hibernate.orm hibernate-testing - ${version.hibernate-4.2} + ${version.hibernate-6.2} - com.vladmihalcea - hibernate-types-4 - ${version.hibernate-types} + jakarta.xml.bind + jakarta.xml.bind-api + ${version.jaxb-api} - ${project.groupId} - blaze-persistence-integration-hibernate-4.2 - test + com.sun.xml.bind + jaxb-impl + ${version.jaxb} + + + jakarta.transaction + jakarta.transaction-api + ${version.jta-api} + + + jakarta.activation + jakarta.activation-api + ${version.activation-api} ${project.groupId} - blaze-persistence-jpa-criteria-jpa-2-compatibility + blaze-persistence-integration-hibernate-6.2 + test ${project.groupId} - blaze-persistence-testsuite-base-hibernate + blaze-persistence-testsuite-base-hibernate6 + ${project.version} compile - org.hibernate + org.hibernate.orm hibernate-jpamodelgen - 1.3.0.Final + ${version.hibernate-6.2} provided - org.codehaus.mojo - build-helper-maven-plugin - - - add-source - generate-sources - - add-source - - - - ${additional.source.directory} - ${project.build.directory}/generated-sources/metamodel - - - - - add-test-source-hibernate - generate-test-sources - - add-test-source - - - - src/test/hibernate - src/test/hibernateold - - - - - - - org.bsc.maven - maven-processor-plugin - - - process - - process - - generate-sources - - - ${additional.source.directory} - - - ${project.build.directory}/generated-sources/metamodel - - org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor - - - - - - - - org.hibernate - hibernate-jpamodelgen - 1.3.0.Final - - - jakarta.xml.bind - jakarta.xml.bind-api - ${version.jaxb-api} - - - com.sun.xml.bind - jaxb-impl - ${version.jaxb} - - - jakarta.transaction - jakarta.transaction-api - ${version.jta} - - - jakarta.activation - jakarta.activation-api - ${version.activation} - - + maven-compiler-plugin + + + + + org.hibernate.orm + hibernate-jpamodelgen + ${version.hibernate-6.2} + + + jakarta.xml.bind + jakarta.xml.bind-api + ${version.jaxb-api} + + + com.sun.xml.bind + jaxb-impl + ${version.jaxb} + + + jakarta.transaction + jakarta.transaction-api + ${version.jta-api} + + + jakarta.activation + jakarta.activation-api + ${version.activation-api} + + + + org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor + + + + -AaddGeneratedAnnotation=false + + - hibernate-4.3 + hibernate-6.4 - com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate,com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate43 + com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate,com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate64 src/main/hibernate - org.hibernate - hibernate-entitymanager - ${version.hibernate-4.3} + org.hibernate.orm + hibernate-core + ${version.hibernate-6.4} - org.hibernate + org.hibernate.orm hibernate-envers - ${version.hibernate-4.3} + ${version.hibernate-6.4} - org.hibernate + org.hibernate.orm hibernate-testing - ${version.hibernate-4.3} + ${version.hibernate-6.4} + + + jakarta.xml.bind + jakarta.xml.bind-api + ${version.jaxb-api} + + + com.sun.xml.bind + jaxb-impl + ${version.jaxb} + + + jakarta.transaction + jakarta.transaction-api + ${version.jta-api} - com.vladmihalcea - hibernate-types-43 - ${version.hibernate-types} + jakarta.activation + jakarta.activation-api + ${version.activation-api} ${project.groupId} - blaze-persistence-integration-hibernate-4.3 + blaze-persistence-integration-hibernate-6.2 test ${project.groupId} - blaze-persistence-testsuite-base-hibernate + blaze-persistence-testsuite-base-hibernate6 + ${project.version} compile - org.hibernate + org.hibernate.orm hibernate-jpamodelgen - ${version.hibernate-4.3} + ${version.hibernate-6.4} provided - org.codehaus.mojo - build-helper-maven-plugin - - - add-source - generate-sources - - add-source - - - - ${additional.source.directory} - ${project.build.directory}/generated-sources/metamodel - - - - - add-test-source-hibernate - generate-test-sources - - add-test-source - - - - src/test/hibernate - src/test/hibernateold - - - - - - - org.bsc.maven - maven-processor-plugin - - - process - - process - - generate-sources - - - ${additional.source.directory} - - - ${project.build.directory}/generated-sources/metamodel - - org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor - - - - - - - - org.hibernate - hibernate-jpamodelgen - ${version.hibernate-4.3} - - - jakarta.xml.bind - jakarta.xml.bind-api - ${version.jaxb-api} - - - com.sun.xml.bind - jaxb-impl - ${version.jaxb} - - - jakarta.transaction - jakarta.transaction-api - ${version.jta} - - - jakarta.activation - jakarta.activation-api - ${version.activation} - - + maven-compiler-plugin + + + + + org.hibernate.orm + hibernate-jpamodelgen + ${version.hibernate-6.4} + + + jakarta.xml.bind + jakarta.xml.bind-api + ${version.jaxb-api} + + + com.sun.xml.bind + jaxb-impl + ${version.jaxb} + + + jakarta.transaction + jakarta.transaction-api + ${version.jta-api} + + + jakarta.activation + jakarta.activation-api + ${version.activation-api} + + + + org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor + + - hibernate-5.0 + hibernate-6.6 + + true + - com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate,com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate50 + com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate,com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate66 src/main/hibernate - org.hibernate - hibernate-entitymanager - ${version.hibernate-5} + org.hibernate.orm + hibernate-core + ${version.hibernate-6.6} - org.hibernate + org.hibernate.orm hibernate-envers - ${version.hibernate-5} + ${version.hibernate-6.6} - org.hibernate + org.hibernate.orm hibernate-testing - ${version.hibernate-5} + ${version.hibernate-6.6} + + + jakarta.xml.bind + jakarta.xml.bind-api + ${version.jaxb-api} + + + com.sun.xml.bind + jaxb-impl + ${version.jaxb} + + + jakarta.transaction + jakarta.transaction-api + ${version.jta-api} - com.vladmihalcea - hibernate-types-5 - ${version.hibernate-types} + jakarta.activation + jakarta.activation-api + ${version.activation-api} ${project.groupId} - blaze-persistence-integration-hibernate-5 + blaze-persistence-integration-hibernate-6.2 test ${project.groupId} - blaze-persistence-testsuite-base-hibernate + blaze-persistence-testsuite-base-hibernate6 + ${project.version} compile - org.hibernate + org.hibernate.orm hibernate-jpamodelgen - ${version.hibernate-5} + ${version.hibernate-6.6} provided - org.codehaus.mojo - build-helper-maven-plugin - - - add-source - generate-sources - - add-source - - - - ${additional.source.directory} - ${project.build.directory}/generated-sources/metamodel - - - - - add-test-source-hibernate - generate-test-sources - - add-test-source - - - - src/test/hibernate - src/test/hibernateold - - - - - - - org.bsc.maven - maven-processor-plugin - - - process - - process - - generate-sources - - - ${additional.source.directory} - - - ${project.build.directory}/generated-sources/metamodel - - org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor - - - - - - - - org.hibernate - hibernate-jpamodelgen - ${version.hibernate-5} - - - jakarta.xml.bind - jakarta.xml.bind-api - ${version.jaxb-api} - - - com.sun.xml.bind - jaxb-impl - ${version.jaxb} - - - jakarta.transaction - jakarta.transaction-api - ${version.jta} - - - jakarta.activation - jakarta.activation-api - ${version.activation} - - + maven-compiler-plugin + + + + + org.hibernate.orm + hibernate-jpamodelgen + ${version.hibernate-6.6} + + + jakarta.xml.bind + jakarta.xml.bind-api + ${version.jaxb-api} + + + com.sun.xml.bind + jaxb-impl + ${version.jaxb} + + + jakarta.transaction + jakarta.transaction-api + ${version.jta-api} + + + jakarta.activation + jakarta.activation-api + ${version.activation-api} + + + + org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor + + - hibernate-5.1 + eclipselink - com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate,com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate51 - src/main/hibernate + com.blazebit.persistence.testsuite.base.jpa.category.NoEclipselink + src/main/basic + + false - org.hibernate - hibernate-entitymanager - ${version.hibernate-5.1} - - - org.hibernate - hibernate-envers - ${version.hibernate-5.1} + org.eclipse.persistence + eclipselink + ${version.eclipselink} - org.hibernate - hibernate-testing - ${version.hibernate-5.1} + ${project.groupId} + blaze-persistence-testsuite-base-eclipselink + compile - - com.vladmihalcea - hibernate-types-5 - ${version.hibernate-types} - - - ${project.groupId} - blaze-persistence-integration-hibernate-5 - test - - - ${project.groupId} - blaze-persistence-testsuite-base-hibernate - compile - - - - org.hibernate - hibernate-jpamodelgen - ${version.hibernate-5.1} - provided - - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - add-source - generate-sources - - add-source - - - - ${additional.source.directory} - ${project.build.directory}/generated-sources/metamodel - - - - - add-test-source-hibernate - generate-test-sources - - add-test-source - - - - src/test/hibernate - src/test/hibernateold - - - - - - - org.bsc.maven - maven-processor-plugin - - - process - - process - - generate-sources - - - ${additional.source.directory} - - - ${project.build.directory}/generated-sources/metamodel - - org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor - - - - - - - - org.hibernate - hibernate-jpamodelgen - ${version.hibernate-5.1} - - - jakarta.xml.bind - jakarta.xml.bind-api - ${version.jaxb-api} - - - com.sun.xml.bind - jaxb-impl - ${version.jaxb} - - - jakarta.transaction - jakarta.transaction-api - ${version.jta} - - - jakarta.activation - jakarta.activation-api - ${version.activation} - - - - - - - - hibernate-5.2 - - com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate,com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate52 - src/main/hibernate - - - - org.hibernate - hibernate-entitymanager - ${version.hibernate-5.2} - - - org.javassist - javassist - - - - - org.hibernate - hibernate-envers - ${version.hibernate-5.2} - - - org.hibernate - hibernate-testing - ${version.hibernate-5.2} - - - com.vladmihalcea - hibernate-types-52 - ${version.hibernate-types} - - - ${project.groupId} - blaze-persistence-integration-hibernate-5.2 - test - - - ${project.groupId} - blaze-persistence-testsuite-base-hibernate - compile - - - - org.hibernate - hibernate-jpamodelgen - ${version.hibernate-5.2} - provided - - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - add-source - generate-sources - - add-source - - - - ${additional.source.directory} - ${project.build.directory}/generated-sources/metamodel - - - - - add-test-source-hibernate - generate-test-sources - - add-test-source - - - - src/test/hibernate - src/test/hibernateold - - - - - - - org.bsc.maven - maven-processor-plugin - - - process - - process - - generate-sources - - - ${additional.source.directory} - - - ${project.build.directory}/generated-sources/metamodel - - org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor - - - - - - - - org.hibernate - hibernate-jpamodelgen - ${version.hibernate-5.2} - - - jakarta.xml.bind - jakarta.xml.bind-api - ${version.jaxb-api} - - - com.sun.xml.bind - jaxb-impl - ${version.jaxb} - - - jakarta.transaction - jakarta.transaction-api - ${version.jta} - - - jakarta.activation - jakarta.activation-api - ${version.activation} - - - - - - - - hibernate-5.3 - - com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate,com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate53 - src/main/hibernate - - - - org.hibernate - hibernate-entitymanager - ${version.hibernate-5.3} - - - org.hibernate - hibernate-envers - ${version.hibernate-5.3} - - - org.hibernate - hibernate-testing - ${version.hibernate-5.3} - - - com.vladmihalcea - hibernate-types-52 - ${version.hibernate-types} - - - ${project.groupId} - blaze-persistence-integration-hibernate-5.3 - test - - - ${project.groupId} - blaze-persistence-testsuite-base-hibernate - compile - - - - org.hibernate - hibernate-jpamodelgen - ${version.hibernate-5.3} - provided - - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - add-source - generate-sources - - add-source - - - - ${additional.source.directory} - ${project.build.directory}/generated-sources/metamodel - - - - - add-test-source-hibernate - generate-test-sources - - add-test-source - - - - src/test/hibernate - src/test/hibernateold - - - - - - - org.bsc.maven - maven-processor-plugin - - - process - - process - - generate-sources - - - ${additional.source.directory} - - - ${project.build.directory}/generated-sources/metamodel - - org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor - - - - - - - - org.hibernate - hibernate-jpamodelgen - ${version.hibernate-5.3} - - - jakarta.xml.bind - jakarta.xml.bind-api - ${version.jaxb-api} - - - com.sun.xml.bind - jaxb-impl - ${version.jaxb} - - - jakarta.transaction - jakarta.transaction-api - ${version.jta} - - - jakarta.activation - jakarta.activation-api - ${version.activation} - - - - - - - - hibernate-5.4 - - com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate - src/main/hibernate - - - - org.hibernate - hibernate-entitymanager - ${version.hibernate-5.4} - - - org.hibernate - hibernate-envers - ${version.hibernate-5.4} - - - org.hibernate - hibernate-testing - ${version.hibernate-5.4} - - - com.vladmihalcea - hibernate-types-52 - ${version.hibernate-types} - - - ${project.groupId} - blaze-persistence-integration-hibernate-5.4 - test - - - ${project.groupId} - blaze-persistence-testsuite-base-hibernate - compile - - - - org.hibernate - hibernate-jpamodelgen - ${version.hibernate-5.4} - provided - - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - add-source - generate-sources - - add-source - - - - ${additional.source.directory} - ${project.build.directory}/generated-sources/metamodel - - - - - add-test-source-hibernate - generate-test-sources - - add-test-source - - - - src/test/hibernate - src/test/hibernateold - - - - - - - org.bsc.maven - maven-processor-plugin - - - process - - process - - generate-sources - - - ${additional.source.directory} - - - ${project.build.directory}/generated-sources/metamodel - - org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor - - - - - - - - org.hibernate - hibernate-jpamodelgen - ${version.hibernate-5.4} - - - jakarta.xml.bind - jakarta.xml.bind-api - ${version.jaxb-api} - - - com.sun.xml.bind - jaxb-impl - ${version.jaxb} - - - jakarta.transaction - jakarta.transaction-api - ${version.jta} - - - jakarta.activation - jakarta.activation-api - ${version.activation} - - - - - - - - hibernate-5.5 - - com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate - src/main/hibernate - - - - org.hibernate - hibernate-entitymanager - ${version.hibernate-5.5} - - - org.hibernate - hibernate-envers - ${version.hibernate-5.5} - - - org.hibernate - hibernate-testing - ${version.hibernate-5.5} - - - com.vladmihalcea - hibernate-types-55 - ${version.hibernate-types} - - - ${project.groupId} - blaze-persistence-integration-hibernate-5.5 - test - - - ${project.groupId} - blaze-persistence-testsuite-base-hibernate - compile - - - - org.hibernate - hibernate-jpamodelgen - ${version.hibernate-5.5} - provided - - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - add-source - generate-sources - - add-source - - - - ${additional.source.directory} - ${project.build.directory}/generated-sources/metamodel - - - - - add-test-source-hibernate - generate-test-sources - - add-test-source - - - - src/test/hibernate - src/test/hibernateold - - - - - - - org.bsc.maven - maven-processor-plugin - - - process - - process - - generate-sources - - - ${additional.source.directory} - - - ${project.build.directory}/generated-sources/metamodel - - org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor - - - - - - - - org.hibernate - hibernate-jpamodelgen - ${version.hibernate-5.5} - - - jakarta.xml.bind - jakarta.xml.bind-api - ${version.jaxb-api} - - - com.sun.xml.bind - jaxb-impl - ${version.jaxb} - - - jakarta.transaction - jakarta.transaction-api - ${version.jta} - - - jakarta.activation - jakarta.activation-api - ${version.activation} - - - - - - - - hibernate-5.6 - - com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate - src/main/hibernate - - - true - - - - org.hibernate - hibernate-entitymanager - ${version.hibernate-5.6} - - - org.hibernate - hibernate-envers - ${version.hibernate-5.6} - - - org.hibernate - hibernate-testing - ${version.hibernate-5.6} - - - com.vladmihalcea - hibernate-types-55 - ${version.hibernate-types} - - - ${project.groupId} - blaze-persistence-integration-hibernate-5.6 - test - - - ${project.groupId} - blaze-persistence-testsuite-base-hibernate - compile - - - - org.hibernate - hibernate-jpamodelgen - ${version.hibernate-5.6} - provided - - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - add-source - generate-sources - - add-source - - - - ${additional.source.directory} - ${project.build.directory}/generated-sources/metamodel - - - - - add-test-source-hibernate - generate-test-sources - - add-test-source - - - - src/test/hibernate - src/test/hibernateold - - - - - - - org.bsc.maven - maven-processor-plugin - - - process - - process - - generate-sources - - - ${additional.source.directory} - - - ${project.build.directory}/generated-sources/metamodel - - org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor - - - - - - - - org.hibernate - hibernate-jpamodelgen - ${version.hibernate-5.6} - - - jakarta.xml.bind - jakarta.xml.bind-api - ${version.jaxb-api} - - - com.sun.xml.bind - jaxb-impl - ${version.jaxb} - - - jakarta.transaction - jakarta.transaction-api - ${version.jta} - - - jakarta.activation - jakarta.activation-api - ${version.activation} - - - - - - - - hibernate-6.2 - - - com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate,com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate60 - src/main/hibernate - - - - org.hibernate - hibernate-core - ${version.hibernate-5.6} - - - org.hibernate - hibernate-envers - ${version.hibernate-5.6} - - - org.hibernate - hibernate-testing - ${version.hibernate-5.6} - - - com.vladmihalcea - hibernate-types-52 - ${version.hibernate-types} - - - jakarta.xml.bind - jakarta.xml.bind-api - ${version.jakarta-jaxb-api} - - - com.sun.xml.bind - jaxb-impl - ${version.jakarta-jaxb} - - - jakarta.transaction - jakarta.transaction-api - ${version.jakarta-jta} - - - jakarta.activation - jakarta.activation-api - ${version.jakarta-activation} - - - ${project.groupId} - blaze-persistence-integration-hibernate-6.2 - test - - - ${project.groupId} - blaze-persistence-testsuite-base-hibernate - compile - - - - org.hibernate - hibernate-jpamodelgen - ${version.hibernate-5.6} - provided - - - - - - maven-surefire-plugin - - true - - - - maven-jar-plugin - - - - test-jar - - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - add-source - generate-sources - - add-source - - - - ${additional.source.directory} - ${project.build.directory}/generated-sources/metamodel - - - - - add-test-source-hibernate - generate-test-sources - - add-test-source - - - - src/test/hibernate - - - - - - - org.bsc.maven - maven-processor-plugin - - - process - - process - - generate-sources - - - ${additional.source.directory} - - - ${project.build.directory}/generated-sources/metamodel - - org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor - - - - - - - - org.hibernate - hibernate-jpamodelgen - ${version.hibernate-5.6} - - - jakarta.xml.bind - jakarta.xml.bind-api - ${version.jakarta-jaxb-api} - - - com.sun.xml.bind - jaxb-impl - ${version.jakarta-jaxb} - - - jakarta.transaction - jakarta.transaction-api - ${version.jakarta-jta} - - - jakarta.activation - jakarta.activation-api - ${version.jakarta-activation} - - - - - - - - hibernate-6.3 - - - com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate,com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate60 - src/main/hibernate - - - - org.hibernate - hibernate-core - ${version.hibernate-5.6} - - - org.hibernate - hibernate-envers - ${version.hibernate-5.6} - - - org.hibernate - hibernate-testing - ${version.hibernate-5.6} - - - com.vladmihalcea - hibernate-types-52 - ${version.hibernate-types} - - - jakarta.xml.bind - jakarta.xml.bind-api - ${version.jakarta-jaxb-api} - - - com.sun.xml.bind - jaxb-impl - ${version.jakarta-jaxb} - - - jakarta.transaction - jakarta.transaction-api - ${version.jakarta-jta} - - - jakarta.activation - jakarta.activation-api - ${version.jakarta-activation} - - - ${project.groupId} - blaze-persistence-integration-hibernate-6.2 - test - - - ${project.groupId} - blaze-persistence-testsuite-base-hibernate - compile - - - - org.hibernate - hibernate-jpamodelgen - ${version.hibernate-5.6} - provided - - - - - - maven-surefire-plugin - - true - - - - maven-jar-plugin - - - - test-jar - - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - add-source - generate-sources - - add-source - - - - ${additional.source.directory} - ${project.build.directory}/generated-sources/metamodel - - - - - add-test-source-hibernate - generate-test-sources - - add-test-source - - - - src/test/hibernate - - - - - - - org.bsc.maven - maven-processor-plugin - - - process - - process - - generate-sources - - - ${additional.source.directory} - - - ${project.build.directory}/generated-sources/metamodel - - org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor - - - - - - - - org.hibernate - hibernate-jpamodelgen - ${version.hibernate-5.6} - - - jakarta.xml.bind - jakarta.xml.bind-api - ${version.jakarta-jaxb-api} - - - com.sun.xml.bind - jaxb-impl - ${version.jakarta-jaxb} - - - jakarta.transaction - jakarta.transaction-api - ${version.jakarta-jta} - - - jakarta.activation - jakarta.activation-api - ${version.jakarta-activation} - - - - - - - - hibernate-6.4 - - - com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate,com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate60 - src/main/hibernate - - - - org.hibernate - hibernate-core - ${version.hibernate-5.6} - - - org.hibernate - hibernate-envers - ${version.hibernate-5.6} - - - org.hibernate - hibernate-testing - ${version.hibernate-5.6} - - - com.vladmihalcea - hibernate-types-52 - ${version.hibernate-types} - - - jakarta.xml.bind - jakarta.xml.bind-api - ${version.jakarta-jaxb-api} - - - com.sun.xml.bind - jaxb-impl - ${version.jakarta-jaxb} - - - jakarta.transaction - jakarta.transaction-api - ${version.jakarta-jta} - - - jakarta.activation - jakarta.activation-api - ${version.jakarta-activation} - - - ${project.groupId} - blaze-persistence-integration-hibernate-6.2 - test - - - ${project.groupId} - blaze-persistence-testsuite-base-hibernate - compile - - - - org.hibernate - hibernate-jpamodelgen - ${version.hibernate-5.6} - provided - - - - - - maven-surefire-plugin - - true - - - - maven-jar-plugin - - - - test-jar - - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - add-source - generate-sources - - add-source - - - - ${additional.source.directory} - ${project.build.directory}/generated-sources/metamodel - - - - - add-test-source-hibernate - generate-test-sources - - add-test-source - - - - src/test/hibernate - - - - - - - org.bsc.maven - maven-processor-plugin - - - process - - process - - generate-sources - - - ${additional.source.directory} - - - ${project.build.directory}/generated-sources/metamodel - - org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor - - - - - - - - org.hibernate - hibernate-jpamodelgen - ${version.hibernate-5.6} - - - jakarta.xml.bind - jakarta.xml.bind-api - ${version.jakarta-jaxb-api} - - - com.sun.xml.bind - jaxb-impl - ${version.jakarta-jaxb} - - - jakarta.transaction - jakarta.transaction-api - ${version.jakarta-jta} - - - jakarta.activation - jakarta.activation-api - ${version.jakarta-activation} - - - - - - - - hibernate-6.5 - - - com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate,com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate60 - src/main/hibernate - - - - org.hibernate - hibernate-core - ${version.hibernate-5.6} - - - org.hibernate - hibernate-envers - ${version.hibernate-5.6} - - - org.hibernate - hibernate-testing - ${version.hibernate-5.6} - - - com.vladmihalcea - hibernate-types-52 - ${version.hibernate-types} - - - jakarta.xml.bind - jakarta.xml.bind-api - ${version.jakarta-jaxb-api} - - - com.sun.xml.bind - jaxb-impl - ${version.jakarta-jaxb} - - - jakarta.transaction - jakarta.transaction-api - ${version.jakarta-jta} - - - jakarta.activation - jakarta.activation-api - ${version.jakarta-activation} - - - ${project.groupId} - blaze-persistence-integration-hibernate-6.2 - test - - - ${project.groupId} - blaze-persistence-testsuite-base-hibernate - compile - - - - org.hibernate - hibernate-jpamodelgen - ${version.hibernate-5.6} - provided - - - - - - maven-surefire-plugin - - true - - - - maven-jar-plugin - - - - test-jar - - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - add-source - generate-sources - - add-source - - - - ${additional.source.directory} - ${project.build.directory}/generated-sources/metamodel - - - - - add-test-source-hibernate - generate-test-sources - - add-test-source - - - - src/test/hibernate - - - - - - - org.bsc.maven - maven-processor-plugin - - - process - - process - - generate-sources - - - ${additional.source.directory} - - - ${project.build.directory}/generated-sources/metamodel - - org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor - - - - - - - - org.hibernate - hibernate-jpamodelgen - ${version.hibernate-5.6} - - - jakarta.xml.bind - jakarta.xml.bind-api - ${version.jakarta-jaxb-api} - - - com.sun.xml.bind - jaxb-impl - ${version.jakarta-jaxb} - - - jakarta.transaction - jakarta.transaction-api - ${version.jakarta-jta} - - - jakarta.activation - jakarta.activation-api - ${version.jakarta-activation} - - - - - - - - hibernate-6.6 - - - com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate,com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate60,com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate66 - src/main/hibernate - - - - org.hibernate - hibernate-core - ${version.hibernate-5.6} - - - org.hibernate - hibernate-envers - ${version.hibernate-5.6} - - - org.hibernate - hibernate-testing - ${version.hibernate-5.6} - - - com.vladmihalcea - hibernate-types-52 - ${version.hibernate-types} - - - jakarta.xml.bind - jakarta.xml.bind-api - ${version.jakarta-jaxb-api} - - - com.sun.xml.bind - jaxb-impl - ${version.jakarta-jaxb} - - - jakarta.transaction - jakarta.transaction-api - ${version.jakarta-jta} - - - jakarta.activation - jakarta.activation-api - ${version.jakarta-activation} - - - ${project.groupId} - blaze-persistence-integration-hibernate-6.2 - test - - - ${project.groupId} - blaze-persistence-testsuite-base-hibernate - compile - - - - org.hibernate - hibernate-jpamodelgen - ${version.hibernate-5.6} - provided - - - - - - maven-surefire-plugin - - true - - - - maven-jar-plugin - - - - test-jar - - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - add-source - generate-sources - - add-source - - - - ${additional.source.directory} - ${project.build.directory}/generated-sources/metamodel - - - - - add-test-source-hibernate - generate-test-sources - - add-test-source - - - - src/test/hibernate - - - - - - - org.bsc.maven - maven-processor-plugin - - - process - - process - - generate-sources - - - ${additional.source.directory} - - - ${project.build.directory}/generated-sources/metamodel - - org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor - - - - - - - - org.hibernate - hibernate-jpamodelgen - ${version.hibernate-5.6} - - - jakarta.xml.bind - jakarta.xml.bind-api - ${version.jakarta-jaxb-api} - - - com.sun.xml.bind - jaxb-impl - ${version.jakarta-jaxb} - - - jakarta.transaction - jakarta.transaction-api - ${version.jakarta-jta} - - - jakarta.activation - jakarta.activation-api - ${version.jakarta-activation} - - - - - - - - eclipselink - - com.blazebit.persistence.testsuite.base.jpa.category.NoEclipselink - src/main/basic - - - - org.eclipse.persistence - eclipselink - ${version.eclipselink} - - - ${project.groupId} - blaze-persistence-testsuite-base-eclipselink - compile - - + org.eclipse.persistence org.eclipse.persistence.jpa.modelgen.processor @@ -2779,755 +774,146 @@ - org.codehaus.mojo - build-helper-maven-plugin - - - add-source - generate-sources - - add-source - - - - ${additional.source.directory} - ${project.build.directory}/generated-sources/metamodel - - - - - - - org.bsc.maven - maven-processor-plugin - - - process - - process - - generate-sources - - - ${additional.source.directory} - - - ${project.build.directory}/generated-sources/metamodel - - org.eclipse.persistence.internal.jpa.modelgen.CanonicalModelProcessor - - - ${basedir}/src/main/resources/META-INF/persistence.xml - - - - - - - - org.eclipse.persistence - org.eclipse.persistence.jpa.modelgen.processor - ${version.eclipselink} - - - jakarta.xml.bind - jakarta.xml.bind-api - ${version.jaxb-api} - - - com.sun.xml.bind - jaxb-impl - ${version.jaxb} - - - jakarta.transaction - jakarta.transaction-api - ${version.jta} - - - jakarta.activation - jakarta.activation-api - ${version.activation} - - - - - - - - datanucleus-4 - - com.blazebit.persistence.testsuite.base.jpa.category.NoDatanucleus,com.blazebit.persistence.testsuite.base.jpa.category.NoDatanucleus4 - src/main/basic - - - - DataNucleus Nightly - DataNucleus Repository Nightly - https://www.datanucleus.org/downloads/maven2-nightly - - - - - org.datanucleus - javax.persistence - 2.1.2 - - - org.datanucleus - datanucleus-core - ${version.datanucleus.base-4} - - - org.datanucleus - datanucleus-api-jpa - ${version.datanucleus.api-jpa-4} - - - org.datanucleus - datanucleus-rdbms - ${version.datanucleus.rdbms-4} - - - ${project.groupId} - blaze-persistence-testsuite-base-datanucleus - compile - - - ${project.groupId} - blaze-persistence-integration-datanucleus - - - - - org.datanucleus - datanucleus-jpa-query - ${version.datanucleus.jpa-5} - provided - - - - - - org.datanucleus - datanucleus-maven-plugin - 4.0.0-release - - JPA - TestsuiteBase - false - true - ${basedir}/log4j.properties - ${project.build.outputDirectory} - true - - - - process-classes - - enhance - - - - - - ${project.groupId} - blaze-persistence-testsuite-base-datanucleus - ${project.version} - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - add-source - generate-sources - - add-source - - - - ${additional.source.directory} - ${project.build.directory}/generated-sources/metamodel - - - - - - - org.bsc.maven - maven-processor-plugin - - - process - - process - - generate-sources - - - ${additional.source.directory} - - - ${project.build.directory}/generated-sources/metamodel - - org.datanucleus.jpa.query.JPACriteriaProcessor - - - - - - - - org.datanucleus - datanucleus-jpa-query - ${version.datanucleus.jpa-5} - - - jakarta.xml.bind - jakarta.xml.bind-api - ${version.jaxb-api} - - - com.sun.xml.bind - jaxb-impl - ${version.jaxb} - - - jakarta.transaction - jakarta.transaction-api - ${version.jta} - - - jakarta.activation - jakarta.activation-api - ${version.activation} - - - - - - - - datanucleus-5 - - com.blazebit.persistence.testsuite.base.jpa.category.NoDatanucleus - src/main/basic - - - - DataNucleus Nightly - DataNucleus Repository Nightly - https://www.datanucleus.org/downloads/maven2-nightly - - - - - org.datanucleus - javax.persistence - 2.1.2 - - - org.datanucleus - datanucleus-core - ${version.datanucleus.base-5} - - - org.datanucleus - datanucleus-api-jpa - ${version.datanucleus.api-jpa-5} - - - org.datanucleus - datanucleus-jpa-query - ${version.datanucleus.jpa-5} - - - org.datanucleus - datanucleus-rdbms - ${version.datanucleus.rdbms-5} - - - ${project.groupId} - blaze-persistence-testsuite-base-datanucleus - compile - - - ${project.groupId} - blaze-persistence-integration-datanucleus - - - - - - org.datanucleus - datanucleus-maven-plugin - 4.0.0-release + maven-compiler-plugin - JPA - TestsuiteBase - false - true - ${basedir}/log4j.properties - ${project.build.outputDirectory} - true + + + + org.eclipse.persistence + org.eclipse.persistence.jpa.modelgen.processor + ${version.eclipselink} + + + jakarta.xml.bind + jakarta.xml.bind-api + ${version.jaxb-api} + + + com.sun.xml.bind + jaxb-impl + ${version.jaxb} + + + jakarta.transaction + jakarta.transaction-api + ${version.jta-api} + + + jakarta.activation + jakarta.activation-api + ${version.activation-api} + + + + -Aeclipselink.persistencexml=${basedir}/src/main/resources/META-INF/persistence.xml + -Aeclipselink.canonicalmodel.use_generated=false + + + org.eclipse.persistence.internal.jpa.modelgen.CanonicalModelProcessor + - - - process-classes - - enhance - - - - - - ${project.groupId} - blaze-persistence-testsuite-base-datanucleus - ${project.version} - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - add-source - generate-sources - - add-source - - - - ${additional.source.directory} - ${project.build.directory}/generated-sources/metamodel - - - - - - - org.bsc.maven - maven-processor-plugin - - - process - - process - - generate-sources - - - ${additional.source.directory} - - - ${project.build.directory}/generated-sources/metamodel - - org.datanucleus.jpa.query.JPACriteriaProcessor - - - - - - - jakarta.xml.bind - jakarta.xml.bind-api - ${version.jaxb-api} - - - com.sun.xml.bind - jaxb-impl - ${version.jaxb} - - - jakarta.transaction - jakarta.transaction-api - ${version.jta} - - - jakarta.activation - jakarta.activation-api - ${version.activation} - - - datanucleus-5.1 + hibernate-apt - com.blazebit.persistence.testsuite.base.jpa.category.NoDatanucleus - src/main/basic + com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate + src/main/hibernate - - - DataNucleus Nightly - DataNucleus Repository Nightly - https://www.datanucleus.org/downloads/maven2-nightly - - - org.datanucleus - javax.persistence - 2.2.0-release - - - org.datanucleus - datanucleus-core - ${version.datanucleus.base-5.1} - - - org.datanucleus - datanucleus-api-jpa - ${version.datanucleus.api-jpa-5.1} - - - org.datanucleus - datanucleus-jpa-query - ${version.datanucleus.jpa-5.1} - - - org.datanucleus - datanucleus-rdbms - ${version.datanucleus.rdbms-5.1} - - - ${project.groupId} - blaze-persistence-testsuite-base-datanucleus - compile - - - ${project.groupId} - blaze-persistence-integration-datanucleus-5.1 + org.hibernate.orm + hibernate-core + ${version.hibernate-apt} - - - - - org.datanucleus - datanucleus-maven-plugin - 4.0.0-release - - JPA - TestsuiteBase - false - true - ${basedir}/log4j.properties - ${project.build.outputDirectory} - true - - - - process-classes - - enhance - - - - - - ${project.groupId} - blaze-persistence-testsuite-base-datanucleus - ${project.version} - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - add-source - generate-sources - - add-source - - - - ${additional.source.directory} - ${project.build.directory}/generated-sources/metamodel - - - - - - - org.bsc.maven - maven-processor-plugin - - - process - - process - - generate-sources - - - ${additional.source.directory} - - - ${project.build.directory}/generated-sources/metamodel - - org.datanucleus.jpa.query.JPACriteriaProcessor - - - - - - - jakarta.xml.bind - jakarta.xml.bind-api - ${version.jaxb-api} - - - com.sun.xml.bind - jaxb-impl - ${version.jaxb} - - - jakarta.transaction - jakarta.transaction-api - ${version.jta} - - - jakarta.activation - jakarta.activation-api - ${version.activation} - - - - - - - - openjpa - - com.blazebit.persistence.testsuite.base.jpa.category.NoOpenJPA - src/main/basic - - - org.apache.openjpa - openjpa-all - ${version.openjpa} + org.hibernate.orm + hibernate-envers + ${version.hibernate-apt} - ${project.groupId} - blaze-persistence-testsuite-base-openjpa - compile + org.hibernate.orm + hibernate-testing + ${version.hibernate-apt} - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - add-source - generate-sources - - add-source - - - - ${additional.source.directory} - ${project.build.directory}/generated-sources/metamodel - - - - - - - org.bsc.maven - maven-processor-plugin - - - process - - process - - generate-sources - - - ${additional.source.directory} - - - ${project.build.directory}/generated-sources/metamodel - - org.apache.openjpa.persistence.meta.AnnotationProcessor6 - - - true - - - - - - - org.apache.openjpa - openjpa-all - ${version.openjpa} - - - jakarta.xml.bind - jakarta.xml.bind-api - ${version.jaxb-api} - - - com.sun.xml.bind - jaxb-impl - ${version.jaxb} - - - jakarta.transaction - jakarta.transaction-api - ${version.jta} - - - jakarta.activation - jakarta.activation-api - ${version.activation} - - - - - - - - hibernate-apt - - com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate - src/main/hibernate - - - org.hibernate - hibernate-entitymanager - ${version.hibernate-5.6} + jakarta.xml.bind + jakarta.xml.bind-api + ${version.jaxb-api} - org.hibernate - hibernate-envers - ${version.hibernate-5.6} + com.sun.xml.bind + jaxb-impl + ${version.jaxb} - org.hibernate - hibernate-testing - ${version.hibernate-5.6} + jakarta.transaction + jakarta.transaction-api + ${version.jta-api} - com.vladmihalcea - hibernate-types-55 - ${version.hibernate-types} + jakarta.activation + jakarta.activation-api + ${version.activation-api} ${project.groupId} - blaze-persistence-integration-hibernate-5.6 + blaze-persistence-integration-hibernate-6.2 test ${project.groupId} - blaze-persistence-testsuite-base-hibernate + blaze-persistence-testsuite-base-hibernate6 + ${project.version} compile - org.hibernate + org.hibernate.orm hibernate-jpamodelgen - ${version.hibernate-5.6} + ${version.hibernate-apt} provided - org.codehaus.mojo - build-helper-maven-plugin - - - add-source - generate-sources - - add-source - - - - ${additional.source.directory} - ${project.build.directory}/generated-sources/metamodel - - - - - add-test-source-hibernate - generate-test-sources - - add-test-source - - - - src/test/hibernate - src/test/hibernateold - - - - - - - org.bsc.maven - maven-processor-plugin - - - process - - process - - generate-sources - - - ${additional.source.directory} - - - ${project.build.directory}/generated-sources/metamodel - - org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor - - - - - - - - org.hibernate - hibernate-jpamodelgen - ${version.hibernate-5.6} - - - jakarta.xml.bind - jakarta.xml.bind-api - ${version.jaxb-api} - - - com.sun.xml.bind - jaxb-impl - ${version.jaxb} - - - jakarta.transaction - jakarta.transaction-api - ${version.jta} - - - jakarta.activation - jakarta.activation-api - ${version.activation} - - + maven-compiler-plugin + + + + + org.hibernate.orm + hibernate-jpamodelgen + ${version.hibernate-apt} + + + jakarta.xml.bind + jakarta.xml.bind-api + ${version.jaxb-api} + + + com.sun.xml.bind + jaxb-impl + ${version.jaxb} + + + jakarta.transaction + jakarta.transaction-api + ${version.jta-api} + + + jakarta.activation + jakarta.activation-api + ${version.activation-api} + + + + org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor + + diff --git a/core/testsuite/src/main/basic/com/blazebit/persistence/testsuite/entity/Person.java b/core/testsuite/src/main/basic/com/blazebit/persistence/testsuite/entity/Person.java index 257bfa5042..1bf6aa5ed7 100644 --- a/core/testsuite/src/main/basic/com/blazebit/persistence/testsuite/entity/Person.java +++ b/core/testsuite/src/main/basic/com/blazebit/persistence/testsuite/entity/Person.java @@ -5,20 +5,20 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.Basic; -import javax.persistence.CollectionTable; -import javax.persistence.Column; -import javax.persistence.ElementCollection; -import javax.persistence.Embedded; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.JoinColumn; -import javax.persistence.JoinTable; -import javax.persistence.ManyToOne; -import javax.persistence.MapKeyColumn; -import javax.persistence.OneToMany; -import javax.persistence.Table; -import javax.persistence.Transient; +import jakarta.persistence.Basic; +import jakarta.persistence.CollectionTable; +import jakarta.persistence.Column; +import jakarta.persistence.ElementCollection; +import jakarta.persistence.Embedded; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.JoinTable; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.MapKeyColumn; +import jakarta.persistence.OneToMany; +import jakarta.persistence.Table; +import jakarta.persistence.Transient; import java.util.HashMap; import java.util.HashSet; import java.util.Map; diff --git a/core/testsuite/src/main/basic/com/blazebit/persistence/testsuite/treat/entity/JoinedEmbeddable.java b/core/testsuite/src/main/basic/com/blazebit/persistence/testsuite/treat/entity/JoinedEmbeddable.java index 27fee530e5..6455ed851b 100644 --- a/core/testsuite/src/main/basic/com/blazebit/persistence/testsuite/treat/entity/JoinedEmbeddable.java +++ b/core/testsuite/src/main/basic/com/blazebit/persistence/testsuite/treat/entity/JoinedEmbeddable.java @@ -12,15 +12,15 @@ import java.util.List; import java.util.Map; import java.util.Set; -import javax.persistence.Embeddable; -import javax.persistence.FetchType; -import javax.persistence.JoinColumn; -import javax.persistence.JoinTable; -import javax.persistence.ManyToMany; -import javax.persistence.ManyToOne; -import javax.persistence.OneToMany; -import javax.persistence.OrderColumn; -import javax.persistence.Transient; +import jakarta.persistence.Embeddable; +import jakarta.persistence.FetchType; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.JoinTable; +import jakarta.persistence.ManyToMany; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.OneToMany; +import jakarta.persistence.OrderColumn; +import jakarta.persistence.Transient; @Embeddable public class JoinedEmbeddable implements BaseEmbeddable, Serializable { diff --git a/core/testsuite/src/main/basic/com/blazebit/persistence/testsuite/treat/entity/JoinedEmbeddableSub1.java b/core/testsuite/src/main/basic/com/blazebit/persistence/testsuite/treat/entity/JoinedEmbeddableSub1.java index 9a1e78a155..dddb9ba4c7 100644 --- a/core/testsuite/src/main/basic/com/blazebit/persistence/testsuite/treat/entity/JoinedEmbeddableSub1.java +++ b/core/testsuite/src/main/basic/com/blazebit/persistence/testsuite/treat/entity/JoinedEmbeddableSub1.java @@ -12,15 +12,15 @@ import java.util.List; import java.util.Map; import java.util.Set; -import javax.persistence.Embeddable; -import javax.persistence.FetchType; -import javax.persistence.JoinColumn; -import javax.persistence.JoinTable; -import javax.persistence.ManyToMany; -import javax.persistence.ManyToOne; -import javax.persistence.OneToMany; -import javax.persistence.OrderColumn; -import javax.persistence.Transient; +import jakarta.persistence.Embeddable; +import jakarta.persistence.FetchType; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.JoinTable; +import jakarta.persistence.ManyToMany; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.OneToMany; +import jakarta.persistence.OrderColumn; +import jakarta.persistence.Transient; @Embeddable public class JoinedEmbeddableSub1 implements Sub1Embeddable, Serializable { diff --git a/core/testsuite/src/main/basic/com/blazebit/persistence/testsuite/treat/entity/JoinedEmbeddableSub2.java b/core/testsuite/src/main/basic/com/blazebit/persistence/testsuite/treat/entity/JoinedEmbeddableSub2.java index a517f17516..86685966f8 100644 --- a/core/testsuite/src/main/basic/com/blazebit/persistence/testsuite/treat/entity/JoinedEmbeddableSub2.java +++ b/core/testsuite/src/main/basic/com/blazebit/persistence/testsuite/treat/entity/JoinedEmbeddableSub2.java @@ -12,15 +12,15 @@ import java.util.List; import java.util.Map; import java.util.Set; -import javax.persistence.Embeddable; -import javax.persistence.FetchType; -import javax.persistence.JoinColumn; -import javax.persistence.JoinTable; -import javax.persistence.ManyToMany; -import javax.persistence.ManyToOne; -import javax.persistence.OneToMany; -import javax.persistence.OrderColumn; -import javax.persistence.Transient; +import jakarta.persistence.Embeddable; +import jakarta.persistence.FetchType; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.JoinTable; +import jakarta.persistence.ManyToMany; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.OneToMany; +import jakarta.persistence.OrderColumn; +import jakarta.persistence.Transient; @Embeddable public class JoinedEmbeddableSub2 implements Sub2Embeddable, Serializable { diff --git a/core/testsuite/src/main/basic/com/blazebit/persistence/testsuite/treat/entity/SingleTableEmbeddable.java b/core/testsuite/src/main/basic/com/blazebit/persistence/testsuite/treat/entity/SingleTableEmbeddable.java index 38b2858676..dc2f0d7722 100644 --- a/core/testsuite/src/main/basic/com/blazebit/persistence/testsuite/treat/entity/SingleTableEmbeddable.java +++ b/core/testsuite/src/main/basic/com/blazebit/persistence/testsuite/treat/entity/SingleTableEmbeddable.java @@ -12,15 +12,15 @@ import java.util.List; import java.util.Map; import java.util.Set; -import javax.persistence.Embeddable; -import javax.persistence.FetchType; -import javax.persistence.JoinColumn; -import javax.persistence.JoinTable; -import javax.persistence.ManyToMany; -import javax.persistence.ManyToOne; -import javax.persistence.OneToMany; -import javax.persistence.OrderColumn; -import javax.persistence.Transient; +import jakarta.persistence.Embeddable; +import jakarta.persistence.FetchType; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.JoinTable; +import jakarta.persistence.ManyToMany; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.OneToMany; +import jakarta.persistence.OrderColumn; +import jakarta.persistence.Transient; @Embeddable public class SingleTableEmbeddable implements BaseEmbeddable, Serializable { diff --git a/core/testsuite/src/main/basic/com/blazebit/persistence/testsuite/treat/entity/SingleTableEmbeddableSub1.java b/core/testsuite/src/main/basic/com/blazebit/persistence/testsuite/treat/entity/SingleTableEmbeddableSub1.java index 65eaf0bca0..22f19e12c9 100644 --- a/core/testsuite/src/main/basic/com/blazebit/persistence/testsuite/treat/entity/SingleTableEmbeddableSub1.java +++ b/core/testsuite/src/main/basic/com/blazebit/persistence/testsuite/treat/entity/SingleTableEmbeddableSub1.java @@ -12,15 +12,15 @@ import java.util.List; import java.util.Map; import java.util.Set; -import javax.persistence.Embeddable; -import javax.persistence.FetchType; -import javax.persistence.JoinColumn; -import javax.persistence.JoinTable; -import javax.persistence.ManyToMany; -import javax.persistence.ManyToOne; -import javax.persistence.OneToMany; -import javax.persistence.OrderColumn; -import javax.persistence.Transient; +import jakarta.persistence.Embeddable; +import jakarta.persistence.FetchType; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.JoinTable; +import jakarta.persistence.ManyToMany; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.OneToMany; +import jakarta.persistence.OrderColumn; +import jakarta.persistence.Transient; @Embeddable public class SingleTableEmbeddableSub1 implements Sub1Embeddable, Serializable { diff --git a/core/testsuite/src/main/basic/com/blazebit/persistence/testsuite/treat/entity/SingleTableEmbeddableSub2.java b/core/testsuite/src/main/basic/com/blazebit/persistence/testsuite/treat/entity/SingleTableEmbeddableSub2.java index 140b74fe30..4e1cf8a0fb 100644 --- a/core/testsuite/src/main/basic/com/blazebit/persistence/testsuite/treat/entity/SingleTableEmbeddableSub2.java +++ b/core/testsuite/src/main/basic/com/blazebit/persistence/testsuite/treat/entity/SingleTableEmbeddableSub2.java @@ -12,15 +12,15 @@ import java.util.List; import java.util.Map; import java.util.Set; -import javax.persistence.Embeddable; -import javax.persistence.FetchType; -import javax.persistence.JoinColumn; -import javax.persistence.JoinTable; -import javax.persistence.ManyToMany; -import javax.persistence.ManyToOne; -import javax.persistence.OneToMany; -import javax.persistence.OrderColumn; -import javax.persistence.Transient; +import jakarta.persistence.Embeddable; +import jakarta.persistence.FetchType; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.JoinTable; +import jakarta.persistence.ManyToMany; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.OneToMany; +import jakarta.persistence.OrderColumn; +import jakarta.persistence.Transient; @Embeddable public class SingleTableEmbeddableSub2 implements Sub2Embeddable, Serializable { diff --git a/core/testsuite/src/main/basic/com/blazebit/persistence/testsuite/treat/entity/TablePerClassBase.java b/core/testsuite/src/main/basic/com/blazebit/persistence/testsuite/treat/entity/TablePerClassBase.java index 2a72f884a6..c588cfe738 100644 --- a/core/testsuite/src/main/basic/com/blazebit/persistence/testsuite/treat/entity/TablePerClassBase.java +++ b/core/testsuite/src/main/basic/com/blazebit/persistence/testsuite/treat/entity/TablePerClassBase.java @@ -5,19 +5,19 @@ package com.blazebit.persistence.testsuite.treat.entity; -import javax.persistence.Column; -import javax.persistence.ConstraintMode; -import javax.persistence.Embedded; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.ForeignKey; -import javax.persistence.Id; -import javax.persistence.Inheritance; -import javax.persistence.InheritanceType; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.OneToMany; -import javax.persistence.Table; +import jakarta.persistence.Column; +import jakarta.persistence.ConstraintMode; +import jakarta.persistence.Embedded; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.ForeignKey; +import jakarta.persistence.Id; +import jakarta.persistence.Inheritance; +import jakarta.persistence.InheritanceType; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.OneToMany; +import jakarta.persistence.Table; import java.io.Serializable; import java.util.HashSet; import java.util.Set; diff --git a/core/testsuite/src/main/basic/com/blazebit/persistence/testsuite/treat/entity/TablePerClassEmbeddable.java b/core/testsuite/src/main/basic/com/blazebit/persistence/testsuite/treat/entity/TablePerClassEmbeddable.java index b8e42e0114..45000a7b91 100644 --- a/core/testsuite/src/main/basic/com/blazebit/persistence/testsuite/treat/entity/TablePerClassEmbeddable.java +++ b/core/testsuite/src/main/basic/com/blazebit/persistence/testsuite/treat/entity/TablePerClassEmbeddable.java @@ -12,17 +12,17 @@ import java.util.List; import java.util.Map; import java.util.Set; -import javax.persistence.ConstraintMode; -import javax.persistence.Embeddable; -import javax.persistence.FetchType; -import javax.persistence.ForeignKey; -import javax.persistence.JoinColumn; -import javax.persistence.JoinTable; -import javax.persistence.ManyToMany; -import javax.persistence.ManyToOne; -import javax.persistence.OneToMany; -import javax.persistence.OrderColumn; -import javax.persistence.Transient; +import jakarta.persistence.ConstraintMode; +import jakarta.persistence.Embeddable; +import jakarta.persistence.FetchType; +import jakarta.persistence.ForeignKey; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.JoinTable; +import jakarta.persistence.ManyToMany; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.OneToMany; +import jakarta.persistence.OrderColumn; +import jakarta.persistence.Transient; @Embeddable public class TablePerClassEmbeddable implements BaseEmbeddable, Serializable { diff --git a/core/testsuite/src/main/basic/com/blazebit/persistence/testsuite/treat/entity/TablePerClassEmbeddableSub1.java b/core/testsuite/src/main/basic/com/blazebit/persistence/testsuite/treat/entity/TablePerClassEmbeddableSub1.java index ce840b7392..241225de9c 100644 --- a/core/testsuite/src/main/basic/com/blazebit/persistence/testsuite/treat/entity/TablePerClassEmbeddableSub1.java +++ b/core/testsuite/src/main/basic/com/blazebit/persistence/testsuite/treat/entity/TablePerClassEmbeddableSub1.java @@ -12,17 +12,17 @@ import java.util.List; import java.util.Map; import java.util.Set; -import javax.persistence.ConstraintMode; -import javax.persistence.Embeddable; -import javax.persistence.FetchType; -import javax.persistence.ForeignKey; -import javax.persistence.JoinColumn; -import javax.persistence.JoinTable; -import javax.persistence.ManyToMany; -import javax.persistence.ManyToOne; -import javax.persistence.OneToMany; -import javax.persistence.OrderColumn; -import javax.persistence.Transient; +import jakarta.persistence.ConstraintMode; +import jakarta.persistence.Embeddable; +import jakarta.persistence.FetchType; +import jakarta.persistence.ForeignKey; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.JoinTable; +import jakarta.persistence.ManyToMany; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.OneToMany; +import jakarta.persistence.OrderColumn; +import jakarta.persistence.Transient; @Embeddable public class TablePerClassEmbeddableSub1 implements Sub1Embeddable, Serializable { diff --git a/core/testsuite/src/main/basic/com/blazebit/persistence/testsuite/treat/entity/TablePerClassEmbeddableSub2.java b/core/testsuite/src/main/basic/com/blazebit/persistence/testsuite/treat/entity/TablePerClassEmbeddableSub2.java index 6b922aae47..185da54819 100644 --- a/core/testsuite/src/main/basic/com/blazebit/persistence/testsuite/treat/entity/TablePerClassEmbeddableSub2.java +++ b/core/testsuite/src/main/basic/com/blazebit/persistence/testsuite/treat/entity/TablePerClassEmbeddableSub2.java @@ -12,17 +12,17 @@ import java.util.List; import java.util.Map; import java.util.Set; -import javax.persistence.ConstraintMode; -import javax.persistence.Embeddable; -import javax.persistence.FetchType; -import javax.persistence.ForeignKey; -import javax.persistence.JoinColumn; -import javax.persistence.JoinTable; -import javax.persistence.ManyToMany; -import javax.persistence.ManyToOne; -import javax.persistence.OneToMany; -import javax.persistence.OrderColumn; -import javax.persistence.Transient; +import jakarta.persistence.ConstraintMode; +import jakarta.persistence.Embeddable; +import jakarta.persistence.FetchType; +import jakarta.persistence.ForeignKey; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.JoinTable; +import jakarta.persistence.ManyToMany; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.OneToMany; +import jakarta.persistence.OrderColumn; +import jakarta.persistence.Transient; @Embeddable public class TablePerClassEmbeddableSub2 implements Sub2Embeddable, Serializable { diff --git a/core/testsuite/src/main/basic/com/blazebit/persistence/testsuite/treat/entity/TablePerClassSub1.java b/core/testsuite/src/main/basic/com/blazebit/persistence/testsuite/treat/entity/TablePerClassSub1.java index df64d92852..af2893270a 100644 --- a/core/testsuite/src/main/basic/com/blazebit/persistence/testsuite/treat/entity/TablePerClassSub1.java +++ b/core/testsuite/src/main/basic/com/blazebit/persistence/testsuite/treat/entity/TablePerClassSub1.java @@ -6,21 +6,21 @@ package com.blazebit.persistence.testsuite.treat.entity; import com.blazebit.persistence.testsuite.entity.IntIdEntity; -import javax.persistence.AssociationOverride; -import javax.persistence.AssociationOverrides; -import javax.persistence.ConstraintMode; -import javax.persistence.Embedded; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.ForeignKey; -import javax.persistence.JoinColumn; -import javax.persistence.JoinTable; -import javax.persistence.ManyToMany; -import javax.persistence.ManyToOne; -import javax.persistence.MapKeyColumn; -import javax.persistence.OneToMany; -import javax.persistence.OrderColumn; -import javax.persistence.Table; +import jakarta.persistence.AssociationOverride; +import jakarta.persistence.AssociationOverrides; +import jakarta.persistence.ConstraintMode; +import jakarta.persistence.Embedded; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.ForeignKey; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.JoinTable; +import jakarta.persistence.ManyToMany; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.MapKeyColumn; +import jakarta.persistence.OneToMany; +import jakarta.persistence.OrderColumn; +import jakarta.persistence.Table; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; diff --git a/core/testsuite/src/main/basic/com/blazebit/persistence/testsuite/treat/entity/TablePerClassSub2.java b/core/testsuite/src/main/basic/com/blazebit/persistence/testsuite/treat/entity/TablePerClassSub2.java index 02ff055417..953af97e2d 100644 --- a/core/testsuite/src/main/basic/com/blazebit/persistence/testsuite/treat/entity/TablePerClassSub2.java +++ b/core/testsuite/src/main/basic/com/blazebit/persistence/testsuite/treat/entity/TablePerClassSub2.java @@ -6,21 +6,21 @@ package com.blazebit.persistence.testsuite.treat.entity; import com.blazebit.persistence.testsuite.entity.IntIdEntity; -import javax.persistence.AssociationOverride; -import javax.persistence.AssociationOverrides; -import javax.persistence.ConstraintMode; -import javax.persistence.Embedded; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.ForeignKey; -import javax.persistence.JoinColumn; -import javax.persistence.JoinTable; -import javax.persistence.ManyToMany; -import javax.persistence.ManyToOne; -import javax.persistence.MapKeyColumn; -import javax.persistence.OneToMany; -import javax.persistence.OrderColumn; -import javax.persistence.Table; +import jakarta.persistence.AssociationOverride; +import jakarta.persistence.AssociationOverrides; +import jakarta.persistence.ConstraintMode; +import jakarta.persistence.Embedded; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.ForeignKey; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.JoinTable; +import jakarta.persistence.ManyToMany; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.MapKeyColumn; +import jakarta.persistence.OneToMany; +import jakarta.persistence.OrderColumn; +import jakarta.persistence.Table; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; diff --git a/core/testsuite/src/main/hibernate/com/blazebit/persistence/testsuite/entity/Person.java b/core/testsuite/src/main/hibernate/com/blazebit/persistence/testsuite/entity/Person.java index 860a2c2666..a2b1f2171a 100644 --- a/core/testsuite/src/main/hibernate/com/blazebit/persistence/testsuite/entity/Person.java +++ b/core/testsuite/src/main/hibernate/com/blazebit/persistence/testsuite/entity/Person.java @@ -5,19 +5,19 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.Basic; -import javax.persistence.CollectionTable; -import javax.persistence.Column; -import javax.persistence.ElementCollection; -import javax.persistence.Embedded; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.JoinColumn; -import javax.persistence.JoinTable; -import javax.persistence.ManyToOne; -import javax.persistence.MapKeyColumn; -import javax.persistence.OneToMany; -import javax.persistence.Table; +import jakarta.persistence.Basic; +import jakarta.persistence.CollectionTable; +import jakarta.persistence.Column; +import jakarta.persistence.ElementCollection; +import jakarta.persistence.Embedded; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.JoinTable; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.MapKeyColumn; +import jakarta.persistence.OneToMany; +import jakarta.persistence.Table; import java.util.HashMap; import java.util.HashSet; import java.util.Map; diff --git a/core/testsuite/src/main/hibernate/com/blazebit/persistence/testsuite/treat/entity/JoinedEmbeddable.java b/core/testsuite/src/main/hibernate/com/blazebit/persistence/testsuite/treat/entity/JoinedEmbeddable.java index 9f49e35aa2..28d251a31d 100644 --- a/core/testsuite/src/main/hibernate/com/blazebit/persistence/testsuite/treat/entity/JoinedEmbeddable.java +++ b/core/testsuite/src/main/hibernate/com/blazebit/persistence/testsuite/treat/entity/JoinedEmbeddable.java @@ -12,15 +12,15 @@ import java.util.List; import java.util.Map; import java.util.Set; -import javax.persistence.Embeddable; -import javax.persistence.FetchType; -import javax.persistence.JoinColumn; -import javax.persistence.JoinTable; -import javax.persistence.ManyToMany; -import javax.persistence.ManyToOne; -import javax.persistence.MapKeyColumn; -import javax.persistence.OneToMany; -import javax.persistence.OrderColumn; +import jakarta.persistence.Embeddable; +import jakarta.persistence.FetchType; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.JoinTable; +import jakarta.persistence.ManyToMany; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.MapKeyColumn; +import jakarta.persistence.OneToMany; +import jakarta.persistence.OrderColumn; @Embeddable public class JoinedEmbeddable implements BaseEmbeddable, Serializable { diff --git a/core/testsuite/src/main/hibernate/com/blazebit/persistence/testsuite/treat/entity/JoinedEmbeddableSub1.java b/core/testsuite/src/main/hibernate/com/blazebit/persistence/testsuite/treat/entity/JoinedEmbeddableSub1.java index 4657f7b9c7..c7dbe8b577 100644 --- a/core/testsuite/src/main/hibernate/com/blazebit/persistence/testsuite/treat/entity/JoinedEmbeddableSub1.java +++ b/core/testsuite/src/main/hibernate/com/blazebit/persistence/testsuite/treat/entity/JoinedEmbeddableSub1.java @@ -12,15 +12,15 @@ import java.util.List; import java.util.Map; import java.util.Set; -import javax.persistence.Embeddable; -import javax.persistence.FetchType; -import javax.persistence.JoinColumn; -import javax.persistence.JoinTable; -import javax.persistence.ManyToMany; -import javax.persistence.ManyToOne; -import javax.persistence.MapKeyColumn; -import javax.persistence.OneToMany; -import javax.persistence.OrderColumn; +import jakarta.persistence.Embeddable; +import jakarta.persistence.FetchType; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.JoinTable; +import jakarta.persistence.ManyToMany; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.MapKeyColumn; +import jakarta.persistence.OneToMany; +import jakarta.persistence.OrderColumn; @Embeddable public class JoinedEmbeddableSub1 implements Sub1Embeddable, Serializable { diff --git a/core/testsuite/src/main/hibernate/com/blazebit/persistence/testsuite/treat/entity/JoinedEmbeddableSub2.java b/core/testsuite/src/main/hibernate/com/blazebit/persistence/testsuite/treat/entity/JoinedEmbeddableSub2.java index 74c7710c11..67fe121709 100644 --- a/core/testsuite/src/main/hibernate/com/blazebit/persistence/testsuite/treat/entity/JoinedEmbeddableSub2.java +++ b/core/testsuite/src/main/hibernate/com/blazebit/persistence/testsuite/treat/entity/JoinedEmbeddableSub2.java @@ -12,15 +12,15 @@ import java.util.List; import java.util.Map; import java.util.Set; -import javax.persistence.Embeddable; -import javax.persistence.FetchType; -import javax.persistence.JoinColumn; -import javax.persistence.JoinTable; -import javax.persistence.ManyToMany; -import javax.persistence.ManyToOne; -import javax.persistence.MapKeyColumn; -import javax.persistence.OneToMany; -import javax.persistence.OrderColumn; +import jakarta.persistence.Embeddable; +import jakarta.persistence.FetchType; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.JoinTable; +import jakarta.persistence.ManyToMany; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.MapKeyColumn; +import jakarta.persistence.OneToMany; +import jakarta.persistence.OrderColumn; @Embeddable public class JoinedEmbeddableSub2 implements Sub2Embeddable, Serializable { diff --git a/core/testsuite/src/main/hibernate/com/blazebit/persistence/testsuite/treat/entity/SingleTableEmbeddable.java b/core/testsuite/src/main/hibernate/com/blazebit/persistence/testsuite/treat/entity/SingleTableEmbeddable.java index 1c69d3b00e..e77bc1e5a7 100644 --- a/core/testsuite/src/main/hibernate/com/blazebit/persistence/testsuite/treat/entity/SingleTableEmbeddable.java +++ b/core/testsuite/src/main/hibernate/com/blazebit/persistence/testsuite/treat/entity/SingleTableEmbeddable.java @@ -12,15 +12,15 @@ import java.util.List; import java.util.Map; import java.util.Set; -import javax.persistence.Embeddable; -import javax.persistence.FetchType; -import javax.persistence.JoinColumn; -import javax.persistence.JoinTable; -import javax.persistence.ManyToMany; -import javax.persistence.ManyToOne; -import javax.persistence.MapKeyColumn; -import javax.persistence.OneToMany; -import javax.persistence.OrderColumn; +import jakarta.persistence.Embeddable; +import jakarta.persistence.FetchType; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.JoinTable; +import jakarta.persistence.ManyToMany; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.MapKeyColumn; +import jakarta.persistence.OneToMany; +import jakarta.persistence.OrderColumn; @Embeddable public class SingleTableEmbeddable implements BaseEmbeddable, Serializable { diff --git a/core/testsuite/src/main/hibernate/com/blazebit/persistence/testsuite/treat/entity/SingleTableEmbeddableSub1.java b/core/testsuite/src/main/hibernate/com/blazebit/persistence/testsuite/treat/entity/SingleTableEmbeddableSub1.java index 9f35f2c6b0..80f2cf83e2 100644 --- a/core/testsuite/src/main/hibernate/com/blazebit/persistence/testsuite/treat/entity/SingleTableEmbeddableSub1.java +++ b/core/testsuite/src/main/hibernate/com/blazebit/persistence/testsuite/treat/entity/SingleTableEmbeddableSub1.java @@ -12,15 +12,15 @@ import java.util.List; import java.util.Map; import java.util.Set; -import javax.persistence.Embeddable; -import javax.persistence.FetchType; -import javax.persistence.JoinColumn; -import javax.persistence.JoinTable; -import javax.persistence.ManyToMany; -import javax.persistence.ManyToOne; -import javax.persistence.MapKeyColumn; -import javax.persistence.OneToMany; -import javax.persistence.OrderColumn; +import jakarta.persistence.Embeddable; +import jakarta.persistence.FetchType; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.JoinTable; +import jakarta.persistence.ManyToMany; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.MapKeyColumn; +import jakarta.persistence.OneToMany; +import jakarta.persistence.OrderColumn; @Embeddable public class SingleTableEmbeddableSub1 implements Sub1Embeddable, Serializable { diff --git a/core/testsuite/src/main/hibernate/com/blazebit/persistence/testsuite/treat/entity/SingleTableEmbeddableSub2.java b/core/testsuite/src/main/hibernate/com/blazebit/persistence/testsuite/treat/entity/SingleTableEmbeddableSub2.java index 88509f4365..259d90ff97 100644 --- a/core/testsuite/src/main/hibernate/com/blazebit/persistence/testsuite/treat/entity/SingleTableEmbeddableSub2.java +++ b/core/testsuite/src/main/hibernate/com/blazebit/persistence/testsuite/treat/entity/SingleTableEmbeddableSub2.java @@ -12,15 +12,15 @@ import java.util.List; import java.util.Map; import java.util.Set; -import javax.persistence.Embeddable; -import javax.persistence.FetchType; -import javax.persistence.JoinColumn; -import javax.persistence.JoinTable; -import javax.persistence.ManyToMany; -import javax.persistence.ManyToOne; -import javax.persistence.MapKeyColumn; -import javax.persistence.OneToMany; -import javax.persistence.OrderColumn; +import jakarta.persistence.Embeddable; +import jakarta.persistence.FetchType; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.JoinTable; +import jakarta.persistence.ManyToMany; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.MapKeyColumn; +import jakarta.persistence.OneToMany; +import jakarta.persistence.OrderColumn; @Embeddable public class SingleTableEmbeddableSub2 implements Sub2Embeddable, Serializable { diff --git a/core/testsuite/src/main/hibernate/com/blazebit/persistence/testsuite/treat/entity/TablePerClassBase.java b/core/testsuite/src/main/hibernate/com/blazebit/persistence/testsuite/treat/entity/TablePerClassBase.java index 1d8d259df4..5e0940a8b8 100644 --- a/core/testsuite/src/main/hibernate/com/blazebit/persistence/testsuite/treat/entity/TablePerClassBase.java +++ b/core/testsuite/src/main/hibernate/com/blazebit/persistence/testsuite/treat/entity/TablePerClassBase.java @@ -5,22 +5,23 @@ package com.blazebit.persistence.testsuite.treat.entity; -import org.hibernate.annotations.ForeignKey; - -import javax.persistence.Column; -import javax.persistence.Embedded; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.Id; -import javax.persistence.Inheritance; -import javax.persistence.InheritanceType; -import javax.persistence.JoinTable; -import javax.persistence.ManyToMany; -import javax.persistence.ManyToOne; -import javax.persistence.MapKeyColumn; -import javax.persistence.OneToMany; -import javax.persistence.OrderColumn; -import javax.persistence.Table; +import jakarta.persistence.Column; +import jakarta.persistence.ConstraintMode; +import jakarta.persistence.Embedded; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.ForeignKey; +import jakarta.persistence.Id; +import jakarta.persistence.Inheritance; +import jakarta.persistence.InheritanceType; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.JoinTable; +import jakarta.persistence.ManyToMany; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.MapKeyColumn; +import jakarta.persistence.OneToMany; +import jakarta.persistence.OrderColumn; +import jakarta.persistence.Table; import java.io.Serializable; import java.util.ArrayList; import java.util.HashMap; @@ -87,7 +88,7 @@ public void setValue(Integer value) { @Override @ManyToOne(fetch = FetchType.LAZY, optional = true) // We can't have a constraint in this case because we don't know the exact table this will refer to - @ForeignKey(name = "none") + @JoinColumn(foreignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT)) public TablePerClassBase getParent() { return parent; } @@ -112,8 +113,7 @@ public void setEmbeddable(TablePerClassEmbeddable embeddable) { @ManyToMany @OrderColumn(name = "list_idx", nullable = false) // We can't have a constraint in this case because we don't know the exact table this will refer to - @JoinTable(name = "tpcb_list") - @ForeignKey(name = "none", inverseName = "none") + @JoinTable(name = "tpcb_list", foreignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT), inverseForeignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT)) public List getList() { return list; } @@ -126,8 +126,7 @@ public void setList(List list) { @Override @ManyToMany // We can't have a constraint in this case because we don't know the exact table this will refer to - @JoinTable(name = "tpcb_map") - @ForeignKey(name = "none", inverseName = "none") + @JoinTable(name = "tpcb_map", foreignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT), inverseForeignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT)) @MapKeyColumn(name = "tpcb_map_key", nullable = false, length = 20) public Map getMap() { return map; diff --git a/core/testsuite/src/main/hibernate/com/blazebit/persistence/testsuite/treat/entity/TablePerClassEmbeddable.java b/core/testsuite/src/main/hibernate/com/blazebit/persistence/testsuite/treat/entity/TablePerClassEmbeddable.java index 0e2bf6a41e..6a21294e27 100644 --- a/core/testsuite/src/main/hibernate/com/blazebit/persistence/testsuite/treat/entity/TablePerClassEmbeddable.java +++ b/core/testsuite/src/main/hibernate/com/blazebit/persistence/testsuite/treat/entity/TablePerClassEmbeddable.java @@ -5,8 +5,6 @@ package com.blazebit.persistence.testsuite.treat.entity; -import org.hibernate.annotations.ForeignKey; - import java.io.Serializable; import java.util.ArrayList; import java.util.HashMap; @@ -14,15 +12,18 @@ import java.util.List; import java.util.Map; import java.util.Set; -import javax.persistence.Embeddable; -import javax.persistence.FetchType; -import javax.persistence.JoinColumn; -import javax.persistence.JoinTable; -import javax.persistence.ManyToMany; -import javax.persistence.ManyToOne; -import javax.persistence.MapKeyColumn; -import javax.persistence.OneToMany; -import javax.persistence.OrderColumn; + +import jakarta.persistence.ConstraintMode; +import jakarta.persistence.Embeddable; +import jakarta.persistence.FetchType; +import jakarta.persistence.ForeignKey; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.JoinTable; +import jakarta.persistence.ManyToMany; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.MapKeyColumn; +import jakarta.persistence.OneToMany; +import jakarta.persistence.OrderColumn; @Embeddable public class TablePerClassEmbeddable implements BaseEmbeddable, Serializable { @@ -43,8 +44,7 @@ public TablePerClassEmbeddable(TablePerClassBase parent) { @Override @ManyToOne(fetch = FetchType.LAZY) // We can't have a constraint in this case because we don't know the exact table this will refer to - @JoinColumn(name = "embeddableParent") - @ForeignKey(name = "none") + @JoinColumn(name = "embeddableParent", foreignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT)) public TablePerClassBase getParent() { return parent; } @@ -70,8 +70,7 @@ public void setChildren(Set children) { @ManyToMany @OrderColumn(name = "list_idx", nullable = false) // We can't have a constraint in this case because we don't know the exact table this will refer to - @JoinTable(name = "tpce_list") - @ForeignKey(name = "none", inverseName = "none") + @JoinTable(name = "tpce_list", foreignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT), inverseForeignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT)) public List getList() { return list; } @@ -84,8 +83,7 @@ public void setList(List list) { @Override @ManyToMany // We can't have a constraint in this case because we don't know the exact table this will refer to - @JoinTable(name = "tpce_map") - @ForeignKey(name = "none", inverseName = "none") + @JoinTable(name = "tpce_map", foreignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT), inverseForeignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT)) @MapKeyColumn(name = "tpce_map_key", nullable = false, length = 20) public Map getMap() { return map; diff --git a/core/testsuite/src/main/hibernate/com/blazebit/persistence/testsuite/treat/entity/TablePerClassEmbeddableSub1.java b/core/testsuite/src/main/hibernate/com/blazebit/persistence/testsuite/treat/entity/TablePerClassEmbeddableSub1.java index 269245dc66..b21c7f43c0 100644 --- a/core/testsuite/src/main/hibernate/com/blazebit/persistence/testsuite/treat/entity/TablePerClassEmbeddableSub1.java +++ b/core/testsuite/src/main/hibernate/com/blazebit/persistence/testsuite/treat/entity/TablePerClassEmbeddableSub1.java @@ -5,8 +5,6 @@ package com.blazebit.persistence.testsuite.treat.entity; -import org.hibernate.annotations.ForeignKey; - import java.io.Serializable; import java.util.ArrayList; import java.util.HashMap; @@ -14,15 +12,18 @@ import java.util.List; import java.util.Map; import java.util.Set; -import javax.persistence.Embeddable; -import javax.persistence.FetchType; -import javax.persistence.JoinColumn; -import javax.persistence.JoinTable; -import javax.persistence.ManyToMany; -import javax.persistence.ManyToOne; -import javax.persistence.MapKeyColumn; -import javax.persistence.OneToMany; -import javax.persistence.OrderColumn; + +import jakarta.persistence.ConstraintMode; +import jakarta.persistence.Embeddable; +import jakarta.persistence.FetchType; +import jakarta.persistence.ForeignKey; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.JoinTable; +import jakarta.persistence.ManyToMany; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.MapKeyColumn; +import jakarta.persistence.OneToMany; +import jakarta.persistence.OrderColumn; @Embeddable public class TablePerClassEmbeddableSub1 implements Sub1Embeddable, Serializable { @@ -54,8 +55,7 @@ public void setSub1SomeValue(Integer sub1SomeValue) { @Override @ManyToOne(fetch = FetchType.LAZY) // We can't have a constraint in this case because we don't know the exact table this will refer to - @JoinColumn(name = "embeddableSub1Parent") - @ForeignKey(name = "none") + @JoinColumn(name = "embeddableSub1Parent", foreignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT)) public TablePerClassBase getSub1Parent() { return sub1Parent; } @@ -81,8 +81,7 @@ public void setSub1Children(Set sub1Children) { @ManyToMany @OrderColumn(name = "list_idx", nullable = false) // We can't have a constraint in this case because we don't know the exact table this will refer to - @JoinTable(name = "tpces1_list") - @ForeignKey(name = "none", inverseName = "none") + @JoinTable(name = "tpces1_list", foreignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT), inverseForeignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT)) public List getSub1List() { return sub1List; } @@ -95,8 +94,7 @@ public void setSub1List(List sub1List) { @Override @ManyToMany // We can't have a constraint in this case because we don't know the exact table this will refer to - @JoinTable(name = "tpces1_map") - @ForeignKey(name = "none", inverseName = "none") + @JoinTable(name = "tpces1_map", foreignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT), inverseForeignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT)) @MapKeyColumn(name = "tpces1_map_key", nullable = false, length = 20) public Map getSub1Map() { return sub1Map; diff --git a/core/testsuite/src/main/hibernate/com/blazebit/persistence/testsuite/treat/entity/TablePerClassEmbeddableSub2.java b/core/testsuite/src/main/hibernate/com/blazebit/persistence/testsuite/treat/entity/TablePerClassEmbeddableSub2.java index 34efae9f71..2fddefcf35 100644 --- a/core/testsuite/src/main/hibernate/com/blazebit/persistence/testsuite/treat/entity/TablePerClassEmbeddableSub2.java +++ b/core/testsuite/src/main/hibernate/com/blazebit/persistence/testsuite/treat/entity/TablePerClassEmbeddableSub2.java @@ -5,8 +5,6 @@ package com.blazebit.persistence.testsuite.treat.entity; -import org.hibernate.annotations.ForeignKey; - import java.io.Serializable; import java.util.ArrayList; import java.util.HashMap; @@ -14,15 +12,18 @@ import java.util.List; import java.util.Map; import java.util.Set; -import javax.persistence.Embeddable; -import javax.persistence.FetchType; -import javax.persistence.JoinColumn; -import javax.persistence.JoinTable; -import javax.persistence.ManyToMany; -import javax.persistence.ManyToOne; -import javax.persistence.MapKeyColumn; -import javax.persistence.OneToMany; -import javax.persistence.OrderColumn; + +import jakarta.persistence.ConstraintMode; +import jakarta.persistence.Embeddable; +import jakarta.persistence.FetchType; +import jakarta.persistence.ForeignKey; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.JoinTable; +import jakarta.persistence.ManyToMany; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.MapKeyColumn; +import jakarta.persistence.OneToMany; +import jakarta.persistence.OrderColumn; @Embeddable public class TablePerClassEmbeddableSub2 implements Sub2Embeddable, Serializable { @@ -54,8 +55,7 @@ public void setSub2SomeValue(Integer sub2SomeValue) { @Override @ManyToOne(fetch = FetchType.LAZY) // We can't have a constraint in this case because we don't know the exact table this will refer to - @JoinColumn(name = "embeddableSub2Parent") - @ForeignKey(name = "none") + @JoinColumn(name = "embeddableSub2Parent", foreignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT)) public TablePerClassBase getSub2Parent() { return sub2Parent; } @@ -81,8 +81,7 @@ public void setSub2Children(Set sub2Children) { @ManyToMany @OrderColumn(name = "list_idx", nullable = false) // We can't have a constraint in this case because we don't know the exact table this will refer to - @JoinTable(name = "tpces2_list") - @ForeignKey(name = "none", inverseName = "none") + @JoinTable(name = "tpces2_list", foreignKey = @jakarta.persistence.ForeignKey(ConstraintMode.NO_CONSTRAINT), inverseForeignKey = @jakarta.persistence.ForeignKey(ConstraintMode.NO_CONSTRAINT)) public List getSub2List() { return sub2List; } @@ -95,8 +94,7 @@ public void setSub2List(List sub2List) { @Override @ManyToMany // We can't have a constraint in this case because we don't know the exact table this will refer to - @JoinTable(name = "tpces2_map") - @ForeignKey(name = "none", inverseName = "none") + @JoinTable(name = "tpces2_map", foreignKey = @jakarta.persistence.ForeignKey(ConstraintMode.NO_CONSTRAINT), inverseForeignKey = @jakarta.persistence.ForeignKey(ConstraintMode.NO_CONSTRAINT)) @MapKeyColumn(name = "tpces2_map_key", nullable = false, length = 20) public Map getSub2Map() { return sub2Map; diff --git a/core/testsuite/src/main/hibernate/com/blazebit/persistence/testsuite/treat/entity/TablePerClassSub1.java b/core/testsuite/src/main/hibernate/com/blazebit/persistence/testsuite/treat/entity/TablePerClassSub1.java index d7fa3b7ab2..14661e65e5 100644 --- a/core/testsuite/src/main/hibernate/com/blazebit/persistence/testsuite/treat/entity/TablePerClassSub1.java +++ b/core/testsuite/src/main/hibernate/com/blazebit/persistence/testsuite/treat/entity/TablePerClassSub1.java @@ -6,18 +6,20 @@ package com.blazebit.persistence.testsuite.treat.entity; import com.blazebit.persistence.testsuite.entity.IntIdEntity; -import org.hibernate.annotations.ForeignKey; - -import javax.persistence.Embedded; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.JoinTable; -import javax.persistence.ManyToMany; -import javax.persistence.ManyToOne; -import javax.persistence.MapKeyColumn; -import javax.persistence.OneToMany; -import javax.persistence.OrderColumn; -import javax.persistence.Table; + +import jakarta.persistence.ConstraintMode; +import jakarta.persistence.Embedded; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.ForeignKey; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.JoinTable; +import jakarta.persistence.ManyToMany; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.MapKeyColumn; +import jakarta.persistence.OneToMany; +import jakarta.persistence.OrderColumn; +import jakarta.persistence.Table; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; @@ -60,7 +62,7 @@ public void setRelation1(IntIdEntity relation1) { @Override @ManyToOne(fetch = FetchType.LAZY) // We can't have a constraint in this case because we don't know the exact table this will refer to - @ForeignKey(name = "none") + @JoinColumn(foreignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT)) public TablePerClassBase getParent1() { return parent1; } @@ -106,8 +108,7 @@ public void setEmbeddable1(TablePerClassEmbeddableSub1 embeddable1) { @ManyToMany @OrderColumn(name = "list_idx", nullable = false) // We can't have a constraint in this case because we don't know the exact table this will refer to - @JoinTable(name = "tpcs1_list1") - @ForeignKey(name = "none", inverseName = "none") + @JoinTable(name = "tpcs1_list1", foreignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT), inverseForeignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT)) public List getList1() { return list1; } @@ -131,8 +132,7 @@ public void setChildren1(Set children1) { @Override @ManyToMany // We can't have a constraint in this case because we don't know the exact table this will refer to - @JoinTable(name = "tpcs1_map1") - @ForeignKey(name = "none", inverseName = "none") + @JoinTable(name = "tpcs1_map1", foreignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT), inverseForeignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT)) @MapKeyColumn(name = "tpcs1_map1_key", nullable = false, length = 20) public Map getMap1() { return map1; diff --git a/core/testsuite/src/main/hibernate/com/blazebit/persistence/testsuite/treat/entity/TablePerClassSub2.java b/core/testsuite/src/main/hibernate/com/blazebit/persistence/testsuite/treat/entity/TablePerClassSub2.java index 6b7a53daba..eb37dfc926 100644 --- a/core/testsuite/src/main/hibernate/com/blazebit/persistence/testsuite/treat/entity/TablePerClassSub2.java +++ b/core/testsuite/src/main/hibernate/com/blazebit/persistence/testsuite/treat/entity/TablePerClassSub2.java @@ -6,18 +6,20 @@ package com.blazebit.persistence.testsuite.treat.entity; import com.blazebit.persistence.testsuite.entity.IntIdEntity; -import org.hibernate.annotations.ForeignKey; - -import javax.persistence.Embedded; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.JoinTable; -import javax.persistence.ManyToMany; -import javax.persistence.ManyToOne; -import javax.persistence.MapKeyColumn; -import javax.persistence.OneToMany; -import javax.persistence.OrderColumn; -import javax.persistence.Table; + +import jakarta.persistence.ConstraintMode; +import jakarta.persistence.Embedded; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.ForeignKey; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.JoinTable; +import jakarta.persistence.ManyToMany; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.MapKeyColumn; +import jakarta.persistence.OneToMany; +import jakarta.persistence.OrderColumn; +import jakarta.persistence.Table; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; @@ -60,7 +62,7 @@ public void setRelation2(IntIdEntity relation2) { @Override @ManyToOne(fetch = FetchType.LAZY) // We can't have a constraint in this case because we don't know the exact table this will refer to - @ForeignKey(name = "none") + @JoinColumn(foreignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT)) public TablePerClassBase getParent2() { return parent2; } @@ -106,8 +108,7 @@ public void setEmbeddable2(TablePerClassEmbeddableSub2 embeddable2) { @ManyToMany @OrderColumn(name = "list_idx", nullable = false) // We can't have a constraint in this case because we don't know the exact table this will refer to - @JoinTable(name = "tpcs2_list2") - @ForeignKey(name = "none", inverseName = "none") + @JoinTable(name = "tpcs2_list2", foreignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT), inverseForeignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT)) public List getList2() { return list2; } @@ -131,8 +132,7 @@ public void setChildren2(Set children2) { @Override @ManyToMany // We can't have a constraint in this case because we don't know the exact table this will refer to - @JoinTable(name = "tpcs2_map2") - @ForeignKey(name = "none", inverseName = "none") + @JoinTable(name = "tpcs2_map2", foreignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT), inverseForeignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT)) @MapKeyColumn(name = "tpcs2_map2_key", nullable = false, length = 20) public Map getMap2() { return map2; diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/AbstractCoreTest.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/AbstractCoreTest.java index 9a4ff43525..aa7bea953c 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/AbstractCoreTest.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/AbstractCoreTest.java @@ -31,9 +31,9 @@ import com.blazebit.persistence.testsuite.tx.TxVoidWork; import com.blazebit.persistence.testsuite.tx.TxWork; -import javax.persistence.EntityManager; -import javax.persistence.metamodel.EntityType; -import javax.persistence.metamodel.Metamodel; +import jakarta.persistence.EntityManager; +import jakarta.persistence.metamodel.EntityType; +import jakarta.persistence.metamodel.Metamodel; import java.time.LocalDateTime; import java.util.ArrayList; import java.util.Arrays; diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/DelegatingDbmsDialect.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/DelegatingDbmsDialect.java index ff4018262f..fb7b2c6dea 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/DelegatingDbmsDialect.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/DelegatingDbmsDialect.java @@ -52,8 +52,8 @@ public boolean supportsNonRecursiveWithClause() { } @Override - public boolean supportsWithClauseHead() { - return delegate.supportsWithClauseHead(); + public boolean supportsPaginationInWithClause() { + return delegate.supportsPaginationInWithClause(); } @Override diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/BlobEntity.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/BlobEntity.java index 963253f758..f9f2597354 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/BlobEntity.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/BlobEntity.java @@ -5,13 +5,13 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.Basic; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Lob; -import javax.persistence.Table; -import javax.persistence.Temporal; -import javax.persistence.TemporalType; +import jakarta.persistence.Basic; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Lob; +import jakarta.persistence.Table; +import jakarta.persistence.Temporal; +import jakarta.persistence.TemporalType; import java.io.Serializable; import java.sql.Blob; import java.util.Date; diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/BookEntity.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/BookEntity.java index 492febba22..954b507384 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/BookEntity.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/BookEntity.java @@ -5,11 +5,11 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.Access; -import javax.persistence.AccessType; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Table; +import jakarta.persistence.Access; +import jakarta.persistence.AccessType; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Table; import java.io.Serializable; /** diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/BookISBNReferenceEntity.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/BookISBNReferenceEntity.java index fbcd0e05d4..ec3e450d1c 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/BookISBNReferenceEntity.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/BookISBNReferenceEntity.java @@ -5,12 +5,12 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.OneToOne; -import javax.persistence.Table; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.OneToOne; +import jakarta.persistence.Table; import java.io.Serializable; /** diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/DeletePersonCTE.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/DeletePersonCTE.java index a0a7c56885..1e0d9f88c2 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/DeletePersonCTE.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/DeletePersonCTE.java @@ -7,10 +7,10 @@ import java.io.Serializable; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.Id; -import javax.persistence.ManyToOne; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.Id; +import jakarta.persistence.ManyToOne; import com.blazebit.persistence.CTE; diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/Document.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/Document.java index 9dc75bb1ed..997298f606 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/Document.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/Document.java @@ -5,24 +5,24 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.Basic; -import javax.persistence.CascadeType; -import javax.persistence.CollectionTable; -import javax.persistence.Column; -import javax.persistence.ElementCollection; -import javax.persistence.Embedded; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.JoinColumn; -import javax.persistence.JoinTable; -import javax.persistence.ManyToOne; -import javax.persistence.MapKeyColumn; -import javax.persistence.OneToMany; -import javax.persistence.OrderColumn; -import javax.persistence.Table; -import javax.persistence.Temporal; -import javax.persistence.TemporalType; -import javax.persistence.Transient; +import jakarta.persistence.Basic; +import jakarta.persistence.CascadeType; +import jakarta.persistence.CollectionTable; +import jakarta.persistence.Column; +import jakarta.persistence.ElementCollection; +import jakarta.persistence.Embedded; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.JoinTable; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.MapKeyColumn; +import jakarta.persistence.OneToMany; +import jakarta.persistence.OrderColumn; +import jakarta.persistence.Table; +import jakarta.persistence.Temporal; +import jakarta.persistence.TemporalType; +import jakarta.persistence.Transient; import java.io.Serializable; import java.util.ArrayList; import java.util.Arrays; diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/DocumentCTE.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/DocumentCTE.java index c482ad760f..b373b4e025 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/DocumentCTE.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/DocumentCTE.java @@ -7,11 +7,11 @@ import com.blazebit.persistence.CTE; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.ManyToOne; -import javax.persistence.OneToOne; -import javax.persistence.PrimaryKeyJoinColumn; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.OneToOne; +import jakarta.persistence.PrimaryKeyJoinColumn; import java.io.Serializable; /** diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/DocumentForEntityKeyMaps.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/DocumentForEntityKeyMaps.java index 1b2625e711..cc6414d7be 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/DocumentForEntityKeyMaps.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/DocumentForEntityKeyMaps.java @@ -5,14 +5,14 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.JoinTable; -import javax.persistence.ManyToMany; -import javax.persistence.MapKeyJoinColumn; -import javax.persistence.Table; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.Id; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.JoinTable; +import jakarta.persistence.ManyToMany; +import jakarta.persistence.MapKeyJoinColumn; +import jakarta.persistence.Table; import java.util.HashMap; import java.util.Map; diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/DocumentForOneToOne.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/DocumentForOneToOne.java index 77ecc99b58..ec4bf33b4d 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/DocumentForOneToOne.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/DocumentForOneToOne.java @@ -5,11 +5,11 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.Basic; -import javax.persistence.CascadeType; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.OneToOne; +import jakarta.persistence.Basic; +import jakarta.persistence.CascadeType; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.OneToOne; import java.io.Serializable; /** diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/DocumentForOneToOneJoinTable.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/DocumentForOneToOneJoinTable.java index 5ea291fa64..c74b67eb8a 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/DocumentForOneToOneJoinTable.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/DocumentForOneToOneJoinTable.java @@ -5,11 +5,11 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.Basic; -import javax.persistence.Entity; -import javax.persistence.JoinColumn; -import javax.persistence.JoinTable; -import javax.persistence.OneToOne; +import jakarta.persistence.Basic; +import jakarta.persistence.Entity; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.JoinTable; +import jakarta.persistence.OneToOne; import java.io.Serializable; /** diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/DocumentForSimpleOneToOne.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/DocumentForSimpleOneToOne.java index 5a6554665c..12f20e952c 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/DocumentForSimpleOneToOne.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/DocumentForSimpleOneToOne.java @@ -5,9 +5,9 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.Basic; -import javax.persistence.Entity; -import javax.persistence.OneToOne; +import jakarta.persistence.Basic; +import jakarta.persistence.Entity; +import jakarta.persistence.OneToOne; import java.io.Serializable; /** diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/DocumentHolder.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/DocumentHolder.java index 0b41e3a13f..ef21c202c5 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/DocumentHolder.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/DocumentHolder.java @@ -5,11 +5,11 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.OneToOne; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.Id; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.OneToOne; import java.io.Serializable; /** diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/DocumentInfo.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/DocumentInfo.java index ee96e70f4a..5fbcc242c2 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/DocumentInfo.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/DocumentInfo.java @@ -5,12 +5,12 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.CascadeType; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.OneToOne; +import jakarta.persistence.CascadeType; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.Id; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.OneToOne; import java.io.Serializable; /** diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/DocumentInfoSimple.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/DocumentInfoSimple.java index 3aee1507b3..62460b4402 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/DocumentInfoSimple.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/DocumentInfoSimple.java @@ -5,11 +5,11 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.OneToOne; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.Id; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.OneToOne; import java.io.Serializable; /** diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/DocumentNodeCTE.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/DocumentNodeCTE.java index 677a4efe32..d54a482e2c 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/DocumentNodeCTE.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/DocumentNodeCTE.java @@ -7,8 +7,8 @@ import java.io.Serializable; -import javax.persistence.Entity; -import javax.persistence.Id; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; import com.blazebit.persistence.CTE; diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/DocumentTupleEntity.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/DocumentTupleEntity.java index 56fa19f423..897494ba96 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/DocumentTupleEntity.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/DocumentTupleEntity.java @@ -5,10 +5,10 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.Id; -import javax.persistence.ManyToOne; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.Id; +import jakarta.persistence.ManyToOne; import java.io.Serializable; /** diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/DocumentWithNullableName.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/DocumentWithNullableName.java index 817d2174b7..0831ed2bd7 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/DocumentWithNullableName.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/DocumentWithNullableName.java @@ -5,13 +5,13 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.JoinColumn; -import javax.persistence.JoinTable; -import javax.persistence.ManyToOne; -import javax.persistence.OneToMany; -import javax.persistence.OrderColumn; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.JoinTable; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.OneToMany; +import jakarta.persistence.OrderColumn; import java.io.Serializable; import java.util.ArrayList; import java.util.List; diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/EmbeddableTestEntity.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/EmbeddableTestEntity.java index 930215d7fc..2d4c80e5ff 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/EmbeddableTestEntity.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/EmbeddableTestEntity.java @@ -5,15 +5,15 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.CollectionTable; -import javax.persistence.DiscriminatorValue; -import javax.persistence.ElementCollection; -import javax.persistence.Embedded; -import javax.persistence.EmbeddedId; -import javax.persistence.Entity; -import javax.persistence.JoinColumn; -import javax.persistence.OrderColumn; -import javax.persistence.Table; +import jakarta.persistence.CollectionTable; +import jakarta.persistence.DiscriminatorValue; +import jakarta.persistence.ElementCollection; +import jakarta.persistence.Embedded; +import jakarta.persistence.EmbeddedId; +import jakarta.persistence.Entity; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.OrderColumn; +import jakarta.persistence.Table; import java.io.Serializable; import java.util.ArrayList; import java.util.List; diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/EmbeddableTestEntityContainer.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/EmbeddableTestEntityContainer.java index abcfa28bcb..e337edc7b3 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/EmbeddableTestEntityContainer.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/EmbeddableTestEntityContainer.java @@ -9,14 +9,14 @@ import java.util.HashSet; import java.util.Set; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.JoinTable; -import javax.persistence.OneToMany; -import javax.persistence.Table; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.Id; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.JoinTable; +import jakarta.persistence.OneToMany; +import jakarta.persistence.Table; @Entity @Table(name = "emb_tst_ent_cont") diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/EmbeddableTestEntityEmbeddable.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/EmbeddableTestEntityEmbeddable.java index 26b6404489..79a5411b8b 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/EmbeddableTestEntityEmbeddable.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/EmbeddableTestEntityEmbeddable.java @@ -5,19 +5,19 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.CollectionTable; -import javax.persistence.ElementCollection; -import javax.persistence.Embeddable; -import javax.persistence.Embedded; -import javax.persistence.FetchType; -import javax.persistence.JoinColumn; -import javax.persistence.JoinColumns; -import javax.persistence.JoinTable; -import javax.persistence.ManyToMany; -import javax.persistence.ManyToOne; -import javax.persistence.MapKeyColumn; -import javax.persistence.OneToMany; -import javax.persistence.OrderColumn; +import jakarta.persistence.CollectionTable; +import jakarta.persistence.ElementCollection; +import jakarta.persistence.Embeddable; +import jakarta.persistence.Embedded; +import jakarta.persistence.FetchType; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.JoinColumns; +import jakarta.persistence.JoinTable; +import jakarta.persistence.ManyToMany; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.MapKeyColumn; +import jakarta.persistence.OneToMany; +import jakarta.persistence.OrderColumn; import java.io.Serializable; import java.util.ArrayList; import java.util.HashMap; diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/EmbeddableTestEntityId.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/EmbeddableTestEntityId.java index 410bf398fd..41367666fc 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/EmbeddableTestEntityId.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/EmbeddableTestEntityId.java @@ -7,8 +7,8 @@ import java.io.Serializable; -import javax.persistence.Column; -import javax.persistence.Embeddable; +import jakarta.persistence.Column; +import jakarta.persistence.Embeddable; @Embeddable public class EmbeddableTestEntityId implements Serializable { diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/EmbeddableTestEntityIdEmbeddable.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/EmbeddableTestEntityIdEmbeddable.java index f5cbd74f4a..3701aa9624 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/EmbeddableTestEntityIdEmbeddable.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/EmbeddableTestEntityIdEmbeddable.java @@ -7,8 +7,8 @@ import java.io.Serializable; -import javax.persistence.Column; -import javax.persistence.Embeddable; +import jakarta.persistence.Column; +import jakarta.persistence.Embeddable; @Embeddable public class EmbeddableTestEntityIdEmbeddable implements Serializable { diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/EmbeddableTestEntityNestedEmbeddable.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/EmbeddableTestEntityNestedEmbeddable.java index f8a2042515..a04ab787b4 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/EmbeddableTestEntityNestedEmbeddable.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/EmbeddableTestEntityNestedEmbeddable.java @@ -5,10 +5,10 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.Embeddable; -import javax.persistence.JoinColumn; -import javax.persistence.JoinTable; -import javax.persistence.OneToMany; +import jakarta.persistence.Embeddable; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.JoinTable; +import jakarta.persistence.OneToMany; import java.io.Serializable; import java.util.HashSet; import java.util.Set; diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/EmbeddableTestEntitySub.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/EmbeddableTestEntitySub.java index 6773ef4839..a77290c3a2 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/EmbeddableTestEntitySub.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/EmbeddableTestEntitySub.java @@ -5,8 +5,8 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.DiscriminatorValue; -import javax.persistence.Entity; +import jakarta.persistence.DiscriminatorValue; +import jakarta.persistence.Entity; @Entity @DiscriminatorValue("sub") diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/EmbeddedDocumentTupleEntity.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/EmbeddedDocumentTupleEntity.java index 03b39b2205..4b29484a39 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/EmbeddedDocumentTupleEntity.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/EmbeddedDocumentTupleEntity.java @@ -5,8 +5,8 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.EmbeddedId; -import javax.persistence.Entity; +import jakarta.persistence.EmbeddedId; +import jakarta.persistence.Entity; import java.io.Serializable; /** diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/EmbeddedDocumentTupleEntityId.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/EmbeddedDocumentTupleEntityId.java index a4f96cd414..5b6baf3c9e 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/EmbeddedDocumentTupleEntityId.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/EmbeddedDocumentTupleEntityId.java @@ -5,8 +5,8 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.Column; -import javax.persistence.Embeddable; +import jakarta.persistence.Column; +import jakarta.persistence.Embeddable; import java.io.Serializable; /** diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/IdClassEntity.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/IdClassEntity.java index c202317767..51b7544cdb 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/IdClassEntity.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/IdClassEntity.java @@ -5,15 +5,15 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.Basic; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.IdClass; -import javax.persistence.JoinColumn; -import javax.persistence.JoinTable; -import javax.persistence.ManyToMany; -import javax.persistence.Table; +import jakarta.persistence.Basic; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.IdClass; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.JoinTable; +import jakarta.persistence.ManyToMany; +import jakarta.persistence.Table; import java.io.Serializable; import java.util.HashSet; import java.util.Set; diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/IdHolderCTE.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/IdHolderCTE.java index 7e1ed11067..e68397be42 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/IdHolderCTE.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/IdHolderCTE.java @@ -7,8 +7,8 @@ import java.io.Serializable; -import javax.persistence.Entity; -import javax.persistence.Id; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; import com.blazebit.persistence.CTE; diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/IndexedEmbeddable.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/IndexedEmbeddable.java index d5ecf46a9e..e93cdd0387 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/IndexedEmbeddable.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/IndexedEmbeddable.java @@ -5,8 +5,8 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.Column; -import javax.persistence.Embeddable; +import jakarta.persistence.Column; +import jakarta.persistence.Embeddable; /** * diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/IndexedNode.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/IndexedNode.java index 7f09880a9a..85c76068a5 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/IndexedNode.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/IndexedNode.java @@ -5,11 +5,11 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.Id; -import javax.persistence.ManyToOne; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.Id; +import jakarta.persistence.ManyToOne; /** * diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/IndexedNode2.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/IndexedNode2.java index 22803e84c9..d220e4563e 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/IndexedNode2.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/IndexedNode2.java @@ -5,11 +5,11 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.Id; -import javax.persistence.ManyToOne; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.Id; +import jakarta.persistence.ManyToOne; /** * diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/IntIdEntity.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/IntIdEntity.java index e4d7f9eea3..11c197f52a 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/IntIdEntity.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/IntIdEntity.java @@ -7,12 +7,12 @@ import java.io.Serializable; -import javax.persistence.Basic; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.Id; -import javax.persistence.Table; +import jakarta.persistence.Basic; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.Id; +import jakarta.persistence.Table; /** * diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/JsonDocument.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/JsonDocument.java index 1102e6c673..8ba0b558b7 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/JsonDocument.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/JsonDocument.java @@ -4,10 +4,10 @@ */ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.Table; /** * @author Moritz Becker diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/JuniorProjectLeader.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/JuniorProjectLeader.java index be7c94cd83..7cc4c126b1 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/JuniorProjectLeader.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/JuniorProjectLeader.java @@ -5,8 +5,8 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.DiscriminatorValue; -import javax.persistence.Entity; +import jakarta.persistence.DiscriminatorValue; +import jakarta.persistence.Entity; /** * diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/KeyedEmbeddable.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/KeyedEmbeddable.java index 61cea80dd7..a6bcd643a4 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/KeyedEmbeddable.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/KeyedEmbeddable.java @@ -5,8 +5,8 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.Column; -import javax.persistence.Embeddable; +import jakarta.persistence.Column; +import jakarta.persistence.Embeddable; /** * diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/KeyedNode.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/KeyedNode.java index 240c5a5de0..0753d4bec5 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/KeyedNode.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/KeyedNode.java @@ -5,11 +5,11 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.Id; -import javax.persistence.ManyToOne; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.Id; +import jakarta.persistence.ManyToOne; /** * diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/KeyedNode2.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/KeyedNode2.java index 24bbb4d8b2..da7314821f 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/KeyedNode2.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/KeyedNode2.java @@ -5,11 +5,11 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.Id; -import javax.persistence.ManyToOne; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.Id; +import jakarta.persistence.ManyToOne; /** * diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/KeysetEntity.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/KeysetEntity.java index f6b5a74ada..e4782c293a 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/KeysetEntity.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/KeysetEntity.java @@ -6,8 +6,8 @@ package com.blazebit.persistence.testsuite.entity; import java.io.Serializable; -import javax.persistence.Entity; -import javax.persistence.Id; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; /** * diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/KeysetEntity2.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/KeysetEntity2.java index 6424b6cf7c..2a5f9c8d82 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/KeysetEntity2.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/KeysetEntity2.java @@ -5,9 +5,9 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.Basic; -import javax.persistence.Entity; -import javax.persistence.Id; +import jakarta.persistence.Basic; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; import java.io.Serializable; /** diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/LargeProject.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/LargeProject.java index a58773acde..5d07dc83a9 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/LargeProject.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/LargeProject.java @@ -5,8 +5,8 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.DiscriminatorValue; -import javax.persistence.Entity; +import jakarta.persistence.DiscriminatorValue; +import jakarta.persistence.Entity; /** * diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/LocalizedEntity.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/LocalizedEntity.java index 6681aef0d9..c10be4eb4e 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/LocalizedEntity.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/LocalizedEntity.java @@ -6,8 +6,8 @@ package com.blazebit.persistence.testsuite.entity; import java.io.Serializable; -import javax.persistence.Column; -import javax.persistence.Embeddable; +import jakarta.persistence.Column; +import jakarta.persistence.Embeddable; /** * diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/LongSequenceEntity.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/LongSequenceEntity.java index d4524755e7..837f3d5944 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/LongSequenceEntity.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/LongSequenceEntity.java @@ -5,9 +5,9 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.GeneratedValue; -import javax.persistence.Id; -import javax.persistence.MappedSuperclass; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.Id; +import jakarta.persistence.MappedSuperclass; import java.io.Serializable; /** diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/NameObject.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/NameObject.java index 75e8c1828d..4a3ca01c5e 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/NameObject.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/NameObject.java @@ -5,11 +5,11 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.Column; -import javax.persistence.Embeddable; -import javax.persistence.FetchType; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; +import jakarta.persistence.Column; +import jakarta.persistence.Embeddable; +import jakarta.persistence.FetchType; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; import java.io.Serializable; @Embeddable diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/NameObjectContainer.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/NameObjectContainer.java index bc2e8c5bbd..b7c6bbef45 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/NameObjectContainer.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/NameObjectContainer.java @@ -5,13 +5,13 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.AssociationOverride; -import javax.persistence.AttributeOverride; -import javax.persistence.AttributeOverrides; -import javax.persistence.Column; -import javax.persistence.Embeddable; -import javax.persistence.Embedded; -import javax.persistence.JoinColumn; +import jakarta.persistence.AssociationOverride; +import jakarta.persistence.AttributeOverride; +import jakarta.persistence.AttributeOverrides; +import jakarta.persistence.Column; +import jakarta.persistence.Embeddable; +import jakarta.persistence.Embedded; +import jakarta.persistence.JoinColumn; import java.io.Serializable; @Embeddable diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/NameObjectContainer2.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/NameObjectContainer2.java index 12829758c8..7982736e76 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/NameObjectContainer2.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/NameObjectContainer2.java @@ -5,13 +5,13 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.AssociationOverride; -import javax.persistence.AttributeOverride; -import javax.persistence.AttributeOverrides; -import javax.persistence.Column; -import javax.persistence.Embeddable; -import javax.persistence.Embedded; -import javax.persistence.JoinColumn; +import jakarta.persistence.AssociationOverride; +import jakarta.persistence.AttributeOverride; +import jakarta.persistence.AttributeOverrides; +import jakarta.persistence.Column; +import jakarta.persistence.Embeddable; +import jakarta.persistence.Embedded; +import jakarta.persistence.JoinColumn; import java.io.Serializable; @Embeddable diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/NaturalIdJoinTableEntity.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/NaturalIdJoinTableEntity.java index f40424ca14..71995db520 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/NaturalIdJoinTableEntity.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/NaturalIdJoinTableEntity.java @@ -5,16 +5,16 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.Access; -import javax.persistence.AccessType; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.JoinColumn; -import javax.persistence.JoinTable; -import javax.persistence.ManyToMany; -import javax.persistence.MapKeyColumn; -import javax.persistence.OneToMany; -import javax.persistence.Table; +import jakarta.persistence.Access; +import jakarta.persistence.AccessType; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.JoinTable; +import jakarta.persistence.ManyToMany; +import jakarta.persistence.MapKeyColumn; +import jakarta.persistence.OneToMany; +import jakarta.persistence.Table; import java.io.Serializable; import java.util.HashMap; import java.util.HashSet; diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/Order.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/Order.java index 4431a63561..15e0904566 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/Order.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/Order.java @@ -8,15 +8,15 @@ import java.io.Serializable; import java.util.HashSet; import java.util.Set; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.GeneratedValue; -import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.OneToMany; -import javax.persistence.Table; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.Id; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.OneToMany; +import jakarta.persistence.Table; /** * diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/OrderPosition.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/OrderPosition.java index 8cd4c56fb1..34d7606519 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/OrderPosition.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/OrderPosition.java @@ -5,14 +5,14 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.EmbeddedId; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.JoinColumn; -import javax.persistence.JoinColumns; -import javax.persistence.ManyToOne; -import javax.persistence.OneToMany; -import javax.persistence.Table; +import jakarta.persistence.EmbeddedId; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.JoinColumns; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.OneToMany; +import jakarta.persistence.Table; import java.io.Serializable; import java.util.HashSet; import java.util.Set; diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/OrderPositionElement.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/OrderPositionElement.java index 2d906b4990..1b7fdbb823 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/OrderPositionElement.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/OrderPositionElement.java @@ -5,9 +5,9 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Table; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Table; import java.io.Serializable; /** diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/OrderPositionHead.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/OrderPositionHead.java index 6c19f2821f..d1da15fae7 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/OrderPositionHead.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/OrderPositionHead.java @@ -7,12 +7,12 @@ import java.io.Serializable; -import javax.persistence.AttributeOverride; -import javax.persistence.AttributeOverrides; -import javax.persistence.Column; -import javax.persistence.EmbeddedId; -import javax.persistence.Entity; -import javax.persistence.Table; +import jakarta.persistence.AttributeOverride; +import jakarta.persistence.AttributeOverrides; +import jakarta.persistence.Column; +import jakarta.persistence.EmbeddedId; +import jakarta.persistence.Entity; +import jakarta.persistence.Table; /** * diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/OrderPositionHeadId.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/OrderPositionHeadId.java index a15e9055fd..136b409bfc 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/OrderPositionHeadId.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/OrderPositionHeadId.java @@ -6,7 +6,7 @@ package com.blazebit.persistence.testsuite.entity; import java.io.Serializable; -import javax.persistence.Embeddable; +import jakarta.persistence.Embeddable; /** * diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/OrderPositionId.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/OrderPositionId.java index 40d4b781ff..30da8f06b3 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/OrderPositionId.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/OrderPositionId.java @@ -6,7 +6,7 @@ package com.blazebit.persistence.testsuite.entity; import java.io.Serializable; -import javax.persistence.Embeddable; +import jakarta.persistence.Embeddable; /** * diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/Ownable.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/Ownable.java index 04ebc011a2..a78b2c2de6 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/Ownable.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/Ownable.java @@ -6,11 +6,11 @@ package com.blazebit.persistence.testsuite.entity; import java.io.Serializable; -import javax.persistence.CascadeType; -import javax.persistence.FetchType; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.MappedSuperclass; +import jakarta.persistence.CascadeType; +import jakarta.persistence.FetchType; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.MappedSuperclass; /** * diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/ParameterOrderCte.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/ParameterOrderCte.java index a4a736416e..4246b063ae 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/ParameterOrderCte.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/ParameterOrderCte.java @@ -7,8 +7,8 @@ import com.blazebit.persistence.CTE; -import javax.persistence.Entity; -import javax.persistence.Id; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; /** * diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/ParameterOrderCteB.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/ParameterOrderCteB.java index 49a12d41cb..bbc30969e8 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/ParameterOrderCteB.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/ParameterOrderCteB.java @@ -7,9 +7,9 @@ import com.blazebit.persistence.CTE; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.IdClass; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.IdClass; import java.io.Serializable; /** diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/ParameterOrderEntity.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/ParameterOrderEntity.java index e9e7167fd4..7002c31526 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/ParameterOrderEntity.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/ParameterOrderEntity.java @@ -5,7 +5,7 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.Entity; +import jakarta.persistence.Entity; /** * diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/Parent.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/Parent.java index de62834538..a505ce1000 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/Parent.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/Parent.java @@ -5,16 +5,16 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.Column; -import javax.persistence.DiscriminatorColumn; -import javax.persistence.DiscriminatorType; -import javax.persistence.DiscriminatorValue; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.Id; -import javax.persistence.Inheritance; -import javax.persistence.InheritanceType; -import javax.persistence.Table; +import jakarta.persistence.Column; +import jakarta.persistence.DiscriminatorColumn; +import jakarta.persistence.DiscriminatorType; +import jakarta.persistence.DiscriminatorValue; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.Id; +import jakarta.persistence.Inheritance; +import jakarta.persistence.InheritanceType; +import jakarta.persistence.Table; import java.io.Serializable; /** diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/PersonCTE.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/PersonCTE.java index beeb0b2be9..29b3f7e311 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/PersonCTE.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/PersonCTE.java @@ -7,10 +7,10 @@ import java.io.Serializable; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.Id; -import javax.persistence.ManyToOne; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.Id; +import jakarta.persistence.ManyToOne; import com.blazebit.persistence.CTE; diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/PersonForEntityKeyMaps.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/PersonForEntityKeyMaps.java index d7f324cb4f..ea7dbe1451 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/PersonForEntityKeyMaps.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/PersonForEntityKeyMaps.java @@ -5,13 +5,13 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.GeneratedValue; -import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.Table; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.Id; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.Table; import java.io.Serializable; /** diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/PolymorphicBase.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/PolymorphicBase.java index 81da6017fd..d90f5d6ba7 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/PolymorphicBase.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/PolymorphicBase.java @@ -7,18 +7,18 @@ import java.io.Serializable; import java.util.*; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.GeneratedValue; -import javax.persistence.Id; -import javax.persistence.Inheritance; -import javax.persistence.InheritanceType; -import javax.persistence.JoinTable; -import javax.persistence.ManyToOne; -import javax.persistence.MapKeyColumn; -import javax.persistence.OneToMany; -import javax.persistence.OneToOne; -import javax.persistence.OrderColumn; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.Id; +import jakarta.persistence.Inheritance; +import jakarta.persistence.InheritanceType; +import jakarta.persistence.JoinTable; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.MapKeyColumn; +import jakarta.persistence.OneToMany; +import jakarta.persistence.OneToOne; +import jakarta.persistence.OrderColumn; /** * diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/PolymorphicBaseContainer.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/PolymorphicBaseContainer.java index 279c4f1b4d..83805d2107 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/PolymorphicBaseContainer.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/PolymorphicBaseContainer.java @@ -5,12 +5,12 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.OneToOne; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.Id; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.OneToOne; import java.util.Objects; /** diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/PolymorphicPropertyBase.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/PolymorphicPropertyBase.java index 5f87778d0f..e5aae5985a 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/PolymorphicPropertyBase.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/PolymorphicPropertyBase.java @@ -6,12 +6,12 @@ package com.blazebit.persistence.testsuite.entity; import java.io.Serializable; -import javax.persistence.DiscriminatorColumn; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.Id; -import javax.persistence.Inheritance; -import javax.persistence.InheritanceType; +import jakarta.persistence.DiscriminatorColumn; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.Id; +import jakarta.persistence.Inheritance; +import jakarta.persistence.InheritanceType; /** * diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/PolymorphicPropertyMapBase.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/PolymorphicPropertyMapBase.java index c7fc7253e2..f1a006c1bb 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/PolymorphicPropertyMapBase.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/PolymorphicPropertyMapBase.java @@ -5,9 +5,9 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.FetchType; -import javax.persistence.ManyToOne; -import javax.persistence.MappedSuperclass; +import jakarta.persistence.FetchType; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.MappedSuperclass; /** * diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/PolymorphicPropertySub1.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/PolymorphicPropertySub1.java index f02e6f0314..091e66afc7 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/PolymorphicPropertySub1.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/PolymorphicPropertySub1.java @@ -5,10 +5,10 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.AssociationOverride; -import javax.persistence.AssociationOverrides; -import javax.persistence.Entity; -import javax.persistence.JoinColumn; +import jakarta.persistence.AssociationOverride; +import jakarta.persistence.AssociationOverrides; +import jakarta.persistence.Entity; +import jakarta.persistence.JoinColumn; /** * diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/PolymorphicPropertySub2.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/PolymorphicPropertySub2.java index 6f25cfaa06..e94eb18ed9 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/PolymorphicPropertySub2.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/PolymorphicPropertySub2.java @@ -5,10 +5,10 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.AssociationOverride; -import javax.persistence.AssociationOverrides; -import javax.persistence.Entity; -import javax.persistence.JoinColumn; +import jakarta.persistence.AssociationOverride; +import jakarta.persistence.AssociationOverrides; +import jakarta.persistence.Entity; +import jakarta.persistence.JoinColumn; /** * diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/PolymorphicSub1.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/PolymorphicSub1.java index c1ac86f044..028f918576 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/PolymorphicSub1.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/PolymorphicSub1.java @@ -5,10 +5,10 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.Embedded; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.ManyToOne; +import jakarta.persistence.Embedded; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.ManyToOne; /** * diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/PolymorphicSub2.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/PolymorphicSub2.java index 67c34e2168..8254d625d4 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/PolymorphicSub2.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/PolymorphicSub2.java @@ -5,10 +5,10 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.Embedded; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.ManyToOne; +import jakarta.persistence.Embedded; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.ManyToOne; /** * diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/PrimitiveDocument.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/PrimitiveDocument.java index 57ff8167ee..b258cb818f 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/PrimitiveDocument.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/PrimitiveDocument.java @@ -4,20 +4,20 @@ */ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.Basic; -import javax.persistence.CascadeType; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.GeneratedValue; -import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.JoinTable; -import javax.persistence.ManyToOne; -import javax.persistence.MapKeyColumn; -import javax.persistence.OneToMany; -import javax.persistence.OneToOne; -import javax.persistence.OrderColumn; -import javax.persistence.Table; +import jakarta.persistence.Basic; +import jakarta.persistence.CascadeType; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.Id; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.JoinTable; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.MapKeyColumn; +import jakarta.persistence.OneToMany; +import jakarta.persistence.OneToOne; +import jakarta.persistence.OrderColumn; +import jakarta.persistence.Table; import java.io.Serializable; import java.util.ArrayList; import java.util.Collection; diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/PrimitiveFamily.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/PrimitiveFamily.java index 88dad1b6bb..108eb39c5f 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/PrimitiveFamily.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/PrimitiveFamily.java @@ -4,14 +4,14 @@ */ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.Basic; -import javax.persistence.CascadeType; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.GeneratedValue; -import javax.persistence.Id; -import javax.persistence.OneToOne; -import javax.persistence.Table; +import jakarta.persistence.Basic; +import jakarta.persistence.CascadeType; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.Id; +import jakarta.persistence.OneToOne; +import jakarta.persistence.Table; import java.io.Serializable; /** diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/PrimitivePerson.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/PrimitivePerson.java index 06e7929342..cdbcedf359 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/PrimitivePerson.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/PrimitivePerson.java @@ -4,16 +4,16 @@ */ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.Basic; -import javax.persistence.CascadeType; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.GeneratedValue; -import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.OneToMany; -import javax.persistence.Table; +import jakarta.persistence.Basic; +import jakarta.persistence.CascadeType; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.Id; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.OneToMany; +import jakarta.persistence.Table; import java.io.Serializable; import java.util.HashSet; import java.util.Set; diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/PrimitiveVersion.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/PrimitiveVersion.java index 139e9f6ab3..e4523efe4d 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/PrimitiveVersion.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/PrimitiveVersion.java @@ -5,11 +5,11 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.Id; -import javax.persistence.OneToOne; -import javax.persistence.Table; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.Id; +import jakarta.persistence.OneToOne; +import jakarta.persistence.Table; import java.io.Serializable; /** diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/Project.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/Project.java index 8529ce85e2..c9a84c5eb4 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/Project.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/Project.java @@ -6,13 +6,13 @@ package com.blazebit.persistence.testsuite.entity; import java.io.Serializable; -import javax.persistence.DiscriminatorColumn; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.GeneratedValue; -import javax.persistence.Id; -import javax.persistence.Inheritance; -import javax.persistence.ManyToOne; +import jakarta.persistence.DiscriminatorColumn; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.Id; +import jakarta.persistence.Inheritance; +import jakarta.persistence.ManyToOne; /** * diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/ProjectLeader.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/ProjectLeader.java index 9a98a7a247..497674ff37 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/ProjectLeader.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/ProjectLeader.java @@ -9,15 +9,15 @@ import java.util.HashSet; import java.util.Set; -import javax.persistence.Basic; -import javax.persistence.DiscriminatorColumn; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.GeneratedValue; -import javax.persistence.Id; -import javax.persistence.Inheritance; -import javax.persistence.ManyToOne; -import javax.persistence.OneToMany; +import jakarta.persistence.Basic; +import jakarta.persistence.DiscriminatorColumn; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.Id; +import jakarta.persistence.Inheritance; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.OneToMany; /** * diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/RawTypeEntity.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/RawTypeEntity.java index 37be9d77a9..8348448c27 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/RawTypeEntity.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/RawTypeEntity.java @@ -5,13 +5,13 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.JoinTable; -import javax.persistence.MapKeyClass; -import javax.persistence.MapKeyColumn; -import javax.persistence.MapKeyJoinColumn; -import javax.persistence.OneToMany; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.JoinTable; +import jakarta.persistence.MapKeyClass; +import jakarta.persistence.MapKeyColumn; +import jakarta.persistence.MapKeyJoinColumn; +import jakarta.persistence.OneToMany; import java.util.List; import java.util.Map; import java.util.Set; diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/RecursiveEntity.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/RecursiveEntity.java index ee3b90ac1b..28b3a073e3 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/RecursiveEntity.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/RecursiveEntity.java @@ -9,14 +9,14 @@ import java.util.HashSet; import java.util.Set; -import javax.persistence.Basic; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.GeneratedValue; -import javax.persistence.Id; -import javax.persistence.JoinTable; -import javax.persistence.ManyToOne; -import javax.persistence.OneToMany; +import jakarta.persistence.Basic; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.Id; +import jakarta.persistence.JoinTable; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.OneToMany; /** * diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/Root.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/Root.java index d2e667d97f..cf3a44f415 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/Root.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/Root.java @@ -5,16 +5,16 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.CollectionTable; -import javax.persistence.ElementCollection; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.JoinTable; -import javax.persistence.ManyToMany; -import javax.persistence.MapKeyColumn; -import javax.persistence.OneToMany; -import javax.persistence.OrderColumn; +import jakarta.persistence.CollectionTable; +import jakarta.persistence.ElementCollection; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.JoinTable; +import jakarta.persistence.ManyToMany; +import jakarta.persistence.MapKeyColumn; +import jakarta.persistence.OneToMany; +import jakarta.persistence.OrderColumn; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/Root2.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/Root2.java index fba9cfb8c6..6f8ccd8faf 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/Root2.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/Root2.java @@ -5,11 +5,11 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.MapKeyColumn; -import javax.persistence.OneToMany; -import javax.persistence.OrderColumn; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.MapKeyColumn; +import jakarta.persistence.OneToMany; +import jakarta.persistence.OrderColumn; import java.util.List; import java.util.Map; diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/SchemaEntity.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/SchemaEntity.java index 50064803ec..8ff742c6a2 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/SchemaEntity.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/SchemaEntity.java @@ -5,9 +5,9 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.Table; /** * diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/SecondaryTableEntityBase.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/SecondaryTableEntityBase.java index 0c67830e80..26b3910dbf 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/SecondaryTableEntityBase.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/SecondaryTableEntityBase.java @@ -5,11 +5,11 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.Id; -import javax.persistence.Inheritance; -import javax.persistence.InheritanceType; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.Id; +import jakarta.persistence.Inheritance; +import jakarta.persistence.InheritanceType; @Entity @Inheritance(strategy = InheritanceType.JOINED) diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/SecondaryTableEntitySub.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/SecondaryTableEntitySub.java index bd3b854445..a860151403 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/SecondaryTableEntitySub.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/SecondaryTableEntitySub.java @@ -5,11 +5,11 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Inheritance; -import javax.persistence.InheritanceType; -import javax.persistence.SecondaryTable; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Inheritance; +import jakarta.persistence.InheritanceType; +import jakarta.persistence.SecondaryTable; @Entity @Inheritance(strategy = InheritanceType.JOINED) diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/SeniorProjectLeader.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/SeniorProjectLeader.java index f0839f1bf0..6e923e905a 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/SeniorProjectLeader.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/SeniorProjectLeader.java @@ -5,8 +5,8 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.DiscriminatorValue; -import javax.persistence.Entity; +import jakarta.persistence.DiscriminatorValue; +import jakarta.persistence.Entity; /** * diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/SequenceBaseEntity.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/SequenceBaseEntity.java index b2d42a6573..96f493cd4d 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/SequenceBaseEntity.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/SequenceBaseEntity.java @@ -5,9 +5,9 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.GeneratedValue; -import javax.persistence.Id; -import javax.persistence.MappedSuperclass; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.Id; +import jakarta.persistence.MappedSuperclass; import java.io.Serializable; /** diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/SimpleEmbeddedIdEntity.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/SimpleEmbeddedIdEntity.java index b5e1cf46eb..d4f4929296 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/SimpleEmbeddedIdEntity.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/SimpleEmbeddedIdEntity.java @@ -5,9 +5,9 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.EmbeddedId; -import javax.persistence.Entity; -import javax.persistence.Table; +import jakarta.persistence.EmbeddedId; +import jakarta.persistence.Entity; +import jakarta.persistence.Table; import java.io.Serializable; /** diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/SimpleEmbeddedIdEntityId.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/SimpleEmbeddedIdEntityId.java index 92aa2719ec..1b117f45b8 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/SimpleEmbeddedIdEntityId.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/SimpleEmbeddedIdEntityId.java @@ -5,7 +5,7 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.Embeddable; +import jakarta.persistence.Embeddable; import java.io.Serializable; import java.util.Objects; diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/SingularListEntity.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/SingularListEntity.java index 5d48bd1db0..589bf5465a 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/SingularListEntity.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/SingularListEntity.java @@ -5,12 +5,12 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.AttributeConverter; -import javax.persistence.Basic; -import javax.persistence.Column; -import javax.persistence.Convert; -import javax.persistence.Entity; -import javax.persistence.Table; +import jakarta.persistence.AttributeConverter; +import jakarta.persistence.Basic; +import jakarta.persistence.Column; +import jakarta.persistence.Convert; +import jakarta.persistence.Entity; +import jakarta.persistence.Table; import java.io.Serializable; import java.util.ArrayList; import java.util.Arrays; diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/SmallProject.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/SmallProject.java index 53750b0c71..ceeadc8e70 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/SmallProject.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/SmallProject.java @@ -5,8 +5,8 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.DiscriminatorValue; -import javax.persistence.Entity; +import jakarta.persistence.DiscriminatorValue; +import jakarta.persistence.Entity; /** * diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/StringIdCTE.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/StringIdCTE.java index 107f05162e..9f017f7320 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/StringIdCTE.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/StringIdCTE.java @@ -7,8 +7,8 @@ import com.blazebit.persistence.CTE; -import javax.persistence.Entity; -import javax.persistence.Id; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; import java.io.Serializable; /** diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/Sub1.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/Sub1.java index e8666ccf83..7100d12e04 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/Sub1.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/Sub1.java @@ -5,8 +5,8 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.DiscriminatorValue; -import javax.persistence.Entity; +import jakarta.persistence.DiscriminatorValue; +import jakarta.persistence.Entity; /** * diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/Sub1Sub1.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/Sub1Sub1.java index da4a96976c..1de47e1e8f 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/Sub1Sub1.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/Sub1Sub1.java @@ -5,8 +5,8 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.DiscriminatorValue; -import javax.persistence.Entity; +import jakarta.persistence.DiscriminatorValue; +import jakarta.persistence.Entity; /** * diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/Sub1Sub2.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/Sub1Sub2.java index 15d1816663..877aff1471 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/Sub1Sub2.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/Sub1Sub2.java @@ -5,8 +5,8 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.DiscriminatorValue; -import javax.persistence.Entity; +import jakarta.persistence.DiscriminatorValue; +import jakarta.persistence.Entity; /** * diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/Sub2.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/Sub2.java index 4aceeb4c9a..4e24d09ee9 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/Sub2.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/Sub2.java @@ -5,8 +5,8 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.DiscriminatorValue; -import javax.persistence.Entity; +import jakarta.persistence.DiscriminatorValue; +import jakarta.persistence.Entity; /** * diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/Sub2Sub1.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/Sub2Sub1.java index 1d6d4f9747..9c72b6b554 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/Sub2Sub1.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/Sub2Sub1.java @@ -5,8 +5,8 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.DiscriminatorValue; -import javax.persistence.Entity; +import jakarta.persistence.DiscriminatorValue; +import jakarta.persistence.Entity; /** * diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/Sub2Sub2.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/Sub2Sub2.java index 2f285ab64c..8ce48f13ab 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/Sub2Sub2.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/Sub2Sub2.java @@ -5,8 +5,8 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.DiscriminatorValue; -import javax.persistence.Entity; +import jakarta.persistence.DiscriminatorValue; +import jakarta.persistence.Entity; /** * diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/TPCBase.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/TPCBase.java index 5da6d97a9a..9d012b2f79 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/TPCBase.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/TPCBase.java @@ -5,10 +5,10 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Inheritance; -import javax.persistence.InheritanceType; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.Inheritance; +import jakarta.persistence.InheritanceType; import java.io.Serializable; /** diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/TPCSub1.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/TPCSub1.java index 42a22c41a8..c2678c2ebf 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/TPCSub1.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/TPCSub1.java @@ -5,7 +5,7 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.Entity; +import jakarta.persistence.Entity; /** * diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/TPCSub2.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/TPCSub2.java index cdb12b45c5..dccff2c011 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/TPCSub2.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/TPCSub2.java @@ -5,7 +5,7 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.Entity; +import jakarta.persistence.Entity; /** * diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/TestAdvancedCTE1.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/TestAdvancedCTE1.java index d9e739922a..cd67e056e3 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/TestAdvancedCTE1.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/TestAdvancedCTE1.java @@ -7,13 +7,13 @@ import com.blazebit.persistence.CTE; -import javax.persistence.Column; -import javax.persistence.Embedded; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; +import jakarta.persistence.Column; +import jakarta.persistence.Embedded; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.Id; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; import java.io.Serializable; /** diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/TestAdvancedCTE2.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/TestAdvancedCTE2.java index 006377a2d5..9d510a9246 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/TestAdvancedCTE2.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/TestAdvancedCTE2.java @@ -7,9 +7,9 @@ import com.blazebit.persistence.CTE; -import javax.persistence.Embedded; -import javax.persistence.Entity; -import javax.persistence.Id; +import jakarta.persistence.Embedded; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; import java.io.Serializable; /** diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/TestCTE.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/TestCTE.java index 36bbceb781..78b09919ca 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/TestCTE.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/TestCTE.java @@ -7,9 +7,9 @@ import java.io.Serializable; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; import com.blazebit.persistence.CTE; diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/TestCTEEmbeddable.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/TestCTEEmbeddable.java index 286a24460f..cf7eec1992 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/TestCTEEmbeddable.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/TestCTEEmbeddable.java @@ -5,11 +5,11 @@ package com.blazebit.persistence.testsuite.entity; -import javax.persistence.Column; -import javax.persistence.Embeddable; -import javax.persistence.FetchType; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; +import jakarta.persistence.Column; +import jakarta.persistence.Embeddable; +import jakarta.persistence.FetchType; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; /** * diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/Version.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/Version.java index d787438a3b..a8b8e1c9e9 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/Version.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/Version.java @@ -9,16 +9,16 @@ import java.util.HashMap; import java.util.Map; -import javax.persistence.CollectionTable; -import javax.persistence.Column; -import javax.persistence.ElementCollection; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.ManyToOne; -import javax.persistence.MapKeyColumn; -import javax.persistence.Table; -import javax.persistence.Temporal; -import javax.persistence.TemporalType; +import jakarta.persistence.CollectionTable; +import jakarta.persistence.Column; +import jakarta.persistence.ElementCollection; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.MapKeyColumn; +import jakarta.persistence.Table; +import jakarta.persistence.Temporal; +import jakarta.persistence.TemporalType; /** * diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/Workflow.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/Workflow.java index d28d00b61f..cb38821c78 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/Workflow.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/Workflow.java @@ -11,15 +11,15 @@ import java.util.Locale; import java.util.Map; import java.util.Set; -import javax.persistence.Basic; -import javax.persistence.CollectionTable; -import javax.persistence.Column; -import javax.persistence.ElementCollection; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.MapKeyColumn; +import jakarta.persistence.Basic; +import jakarta.persistence.CollectionTable; +import jakarta.persistence.Column; +import jakarta.persistence.ElementCollection; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.Id; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.MapKeyColumn; /** * diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/treat/entity/IntValueEmbeddable.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/treat/entity/IntValueEmbeddable.java index 5ddadc82a3..ddded3c706 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/treat/entity/IntValueEmbeddable.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/treat/entity/IntValueEmbeddable.java @@ -5,7 +5,7 @@ package com.blazebit.persistence.testsuite.treat.entity; -import javax.persistence.Embeddable; +import jakarta.persistence.Embeddable; import java.io.Serializable; import java.util.Objects; diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/treat/entity/JoinedBase.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/treat/entity/JoinedBase.java index 6a8e01a912..f5792de51e 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/treat/entity/JoinedBase.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/treat/entity/JoinedBase.java @@ -5,21 +5,21 @@ package com.blazebit.persistence.testsuite.treat.entity; -import javax.persistence.Column; -import javax.persistence.Embedded; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.GeneratedValue; -import javax.persistence.Id; -import javax.persistence.Inheritance; -import javax.persistence.InheritanceType; -import javax.persistence.JoinTable; -import javax.persistence.ManyToMany; -import javax.persistence.ManyToOne; -import javax.persistence.MapKeyColumn; -import javax.persistence.OneToMany; -import javax.persistence.OrderColumn; -import javax.persistence.Table; +import jakarta.persistence.Column; +import jakarta.persistence.Embedded; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.Id; +import jakarta.persistence.Inheritance; +import jakarta.persistence.InheritanceType; +import jakarta.persistence.JoinTable; +import jakarta.persistence.ManyToMany; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.MapKeyColumn; +import jakarta.persistence.OneToMany; +import jakarta.persistence.OrderColumn; +import jakarta.persistence.Table; import java.io.Serializable; import java.util.ArrayList; import java.util.HashMap; diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/treat/entity/JoinedSub1.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/treat/entity/JoinedSub1.java index 5d5c6b970a..8bbd9823a4 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/treat/entity/JoinedSub1.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/treat/entity/JoinedSub1.java @@ -7,16 +7,16 @@ import com.blazebit.persistence.testsuite.entity.IntIdEntity; -import javax.persistence.Embedded; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.JoinTable; -import javax.persistence.ManyToMany; -import javax.persistence.ManyToOne; -import javax.persistence.MapKeyColumn; -import javax.persistence.OneToMany; -import javax.persistence.OrderColumn; -import javax.persistence.Table; +import jakarta.persistence.Embedded; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.JoinTable; +import jakarta.persistence.ManyToMany; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.MapKeyColumn; +import jakarta.persistence.OneToMany; +import jakarta.persistence.OrderColumn; +import jakarta.persistence.Table; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/treat/entity/JoinedSub2.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/treat/entity/JoinedSub2.java index b84c5f4510..8ecacb17b4 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/treat/entity/JoinedSub2.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/treat/entity/JoinedSub2.java @@ -7,16 +7,16 @@ import com.blazebit.persistence.testsuite.entity.IntIdEntity; -import javax.persistence.Embedded; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.JoinTable; -import javax.persistence.ManyToMany; -import javax.persistence.ManyToOne; -import javax.persistence.MapKeyColumn; -import javax.persistence.OneToMany; -import javax.persistence.OrderColumn; -import javax.persistence.Table; +import jakarta.persistence.Embedded; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.JoinTable; +import jakarta.persistence.ManyToMany; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.MapKeyColumn; +import jakarta.persistence.OneToMany; +import jakarta.persistence.OrderColumn; +import jakarta.persistence.Table; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/treat/entity/SingleTableBase.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/treat/entity/SingleTableBase.java index 8183adc3fc..0c0ee1f725 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/treat/entity/SingleTableBase.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/treat/entity/SingleTableBase.java @@ -5,21 +5,21 @@ package com.blazebit.persistence.testsuite.treat.entity; -import javax.persistence.Column; -import javax.persistence.Embedded; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.GeneratedValue; -import javax.persistence.Id; -import javax.persistence.Inheritance; -import javax.persistence.InheritanceType; -import javax.persistence.JoinTable; -import javax.persistence.ManyToMany; -import javax.persistence.ManyToOne; -import javax.persistence.MapKeyColumn; -import javax.persistence.OneToMany; -import javax.persistence.OrderColumn; -import javax.persistence.Table; +import jakarta.persistence.Column; +import jakarta.persistence.Embedded; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.Id; +import jakarta.persistence.Inheritance; +import jakarta.persistence.InheritanceType; +import jakarta.persistence.JoinTable; +import jakarta.persistence.ManyToMany; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.MapKeyColumn; +import jakarta.persistence.OneToMany; +import jakarta.persistence.OrderColumn; +import jakarta.persistence.Table; import java.io.Serializable; import java.util.ArrayList; import java.util.HashMap; diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/treat/entity/SingleTableSub1.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/treat/entity/SingleTableSub1.java index d05b89fb7a..24947d8f9e 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/treat/entity/SingleTableSub1.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/treat/entity/SingleTableSub1.java @@ -7,17 +7,17 @@ import com.blazebit.persistence.testsuite.entity.IntIdEntity; -import javax.persistence.AttributeOverride; -import javax.persistence.Column; -import javax.persistence.Embedded; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.JoinTable; -import javax.persistence.ManyToMany; -import javax.persistence.ManyToOne; -import javax.persistence.MapKeyColumn; -import javax.persistence.OneToMany; -import javax.persistence.OrderColumn; +import jakarta.persistence.AttributeOverride; +import jakarta.persistence.Column; +import jakarta.persistence.Embedded; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.JoinTable; +import jakarta.persistence.ManyToMany; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.MapKeyColumn; +import jakarta.persistence.OneToMany; +import jakarta.persistence.OrderColumn; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/treat/entity/SingleTableSub2.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/treat/entity/SingleTableSub2.java index 11cb50c062..94f15daadc 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/treat/entity/SingleTableSub2.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/treat/entity/SingleTableSub2.java @@ -7,17 +7,17 @@ import com.blazebit.persistence.testsuite.entity.IntIdEntity; -import javax.persistence.AttributeOverride; -import javax.persistence.Column; -import javax.persistence.Embedded; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.JoinTable; -import javax.persistence.ManyToMany; -import javax.persistence.ManyToOne; -import javax.persistence.MapKeyColumn; -import javax.persistence.OneToMany; -import javax.persistence.OrderColumn; +import jakarta.persistence.AttributeOverride; +import jakarta.persistence.Column; +import jakarta.persistence.Embedded; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.JoinTable; +import jakarta.persistence.ManyToMany; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.MapKeyColumn; +import jakarta.persistence.OneToMany; +import jakarta.persistence.OrderColumn; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/tx/TxSupport.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/tx/TxSupport.java index db086c375f..0daf95ed00 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/tx/TxSupport.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/tx/TxSupport.java @@ -5,8 +5,8 @@ package com.blazebit.persistence.testsuite.tx; -import javax.persistence.EntityManager; -import javax.persistence.EntityTransaction; +import jakarta.persistence.EntityManager; +import jakarta.persistence.EntityTransaction; public class TxSupport { diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/tx/TxVoidWork.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/tx/TxVoidWork.java index ef46a93269..db8bd6778f 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/tx/TxVoidWork.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/tx/TxVoidWork.java @@ -6,7 +6,7 @@ package com.blazebit.persistence.testsuite.tx; -import javax.persistence.EntityManager; +import jakarta.persistence.EntityManager; public abstract class TxVoidWork { diff --git a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/tx/TxWork.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/tx/TxWork.java index 03e019c1f0..71dd74329a 100644 --- a/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/tx/TxWork.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/tx/TxWork.java @@ -6,7 +6,7 @@ package com.blazebit.persistence.testsuite.tx; -import javax.persistence.EntityManager; +import jakarta.persistence.EntityManager; public abstract class TxWork { diff --git a/core/testsuite/src/main/java/module-info.java b/core/testsuite/src/main/java/module-info.java new file mode 100644 index 0000000000..511b864941 --- /dev/null +++ b/core/testsuite/src/main/java/module-info.java @@ -0,0 +1,19 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * Copyright Blazebit + */ +open module com.blazebit.persistence.core.testsuite { + requires com.blazebit.persistence.testsuite.assertion; + requires com.blazebit.persistence.testsuite.base; + requires com.blazebit.persistence.testsuite.base.jpa; + requires com.blazebit.persistence.core.impl; + requires com.blazebit.persistence.core.parser; + requires com.blazebit.persistence.core; + requires com.blazebit.common.utils; + requires jakarta.annotation; + exports com.blazebit.persistence.testsuite; + exports com.blazebit.persistence.testsuite.entity; + exports com.blazebit.persistence.testsuite.treat.entity; + exports com.blazebit.persistence.testsuite.tx; + uses com.blazebit.persistence.spi.EntityManagerFactoryIntegrator; +} \ No newline at end of file diff --git a/core/testsuite/src/test/hibernate/org/hibernate/engine/spi/SharedSessionContractImplementor.java b/core/testsuite/src/test/hibernate/org/hibernate/engine/spi/SharedSessionContractImplementor.java deleted file mode 100644 index dca3736d8a..0000000000 --- a/core/testsuite/src/test/hibernate/org/hibernate/engine/spi/SharedSessionContractImplementor.java +++ /dev/null @@ -1,16 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Blazebit - */ - -package org.hibernate.engine.spi; - -/** - * See com.blazebit.persistence.testsuite.base.AbstractPersistenceTest why this is necessary. - * The short version, we need this stub for custom user type tests for Hibernate before 5.1. - * - * @author Christian Beikov - * @since 1.5.0 - */ -public interface SharedSessionContractImplementor { -} diff --git a/core/testsuite/src/test/hibernateold/com/blazebit/persistence/testsuite/CustomTypeFunctionArgumentTest.java b/core/testsuite/src/test/hibernateold/com/blazebit/persistence/testsuite/CustomTypeFunctionArgumentTest.java deleted file mode 100644 index 195aec48c1..0000000000 --- a/core/testsuite/src/test/hibernateold/com/blazebit/persistence/testsuite/CustomTypeFunctionArgumentTest.java +++ /dev/null @@ -1,140 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Blazebit - */ - -package com.blazebit.persistence.testsuite; - -import com.blazebit.persistence.spi.CriteriaBuilderConfiguration; -import com.blazebit.persistence.spi.FunctionRenderContext; -import com.blazebit.persistence.spi.JpqlFunction; -import com.blazebit.persistence.spi.JpqlFunctionGroup; -import com.blazebit.persistence.testsuite.base.jpa.category.NoDB2; -import com.blazebit.persistence.testsuite.base.jpa.category.NoH2; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate42; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate43; -import com.blazebit.persistence.testsuite.base.jpa.category.NoMSSQL; -import com.blazebit.persistence.testsuite.base.jpa.category.NoMySQL; -import com.blazebit.persistence.testsuite.base.jpa.category.NoMySQLOld; -import com.blazebit.persistence.testsuite.base.jpa.category.NoOracle; -import com.blazebit.persistence.testsuite.tx.TxVoidWork; -import com.vladmihalcea.hibernate.type.array.StringArrayType; -import org.hibernate.annotations.Type; -import org.hibernate.annotations.TypeDef; -import org.junit.Before; -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.EntityManager; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.Table; -import java.lang.reflect.InvocationTargetException; - -/** - * @author Jan-Willem Gmelig Meyling - * @since 1.4.0 - */ -public class CustomTypeFunctionArgumentTest extends AbstractCoreTest { - - @Override - protected Class[] getEntityClasses() { - return new Class[] { EntityWithCustomType.class }; - } - - @Before - public void setUp() throws Exception { - transactional(new TxVoidWork() { - @Override - public void work(EntityManager em) { - EntityWithCustomType entityWithCustomType = new EntityWithCustomType(); - entityWithCustomType.sensorNames = new String[] { - "Temperature", - "Pressure" - }; - em.persist(entityWithCustomType); - em.flush(); - em.clear(); - } - }); - } - - @Override - protected void configure(CriteriaBuilderConfiguration config) { - config.registerFunction(new JpqlFunctionGroup("array_contains", new ArrayContainsFunction())); - super.configure(config); - } - - // NOTE: this API was only introduced in Hibernate 5 - @Test - @Category({ NoHibernate42.class, NoHibernate43.class, NoDB2.class, NoOracle.class, NoMySQL.class, NoMSSQL.class, NoMySQLOld.class, NoH2.class }) - public void testHibernateCustomTypedParameterValue() { - transactional(new TxVoidWork() { - @Override - public void work(EntityManager em) { - cbf.create(em, EntityWithCustomType.class, "a") - .where("array_contains(a.sensorNames, :elements)").eqLiteral(true) - .setParameter("elements", getTypedParameterValue(StringArrayType.INSTANCE, new String[] { "Temperature"})) - .getSingleResult(); - } - }); - } - - Object getTypedParameterValue(org.hibernate.type.Type type, Object value) { - try { - return Class.forName("org.hibernate.jpa.TypedParameterValue").getConstructor(org.hibernate.type.Type.class, Object.class).newInstance(type, value); - } catch (Exception e) { - throw new RuntimeException(e); - } - } - - @Entity - @Table(name = "ewct") - @TypeDef( - name = "string-array", - typeClass = StringArrayType.class - ) - public static class EntityWithCustomType { - - @Id - @GeneratedValue(strategy = GenerationType.AUTO) - private Long id; - - @Type(type = "string-array") - @Column( - name = "sensor_names", - columnDefinition = "text[]" - ) - private String[] sensorNames; - - } - - public static class ArrayContainsFunction implements JpqlFunction { - - @Override - public boolean hasArguments() { - return true; - } - - @Override - public boolean hasParenthesesIfNoArguments() { - return false; - } - - @Override - public Class getReturnType(Class firstArgumentType) { - return Boolean.class; - } - - @Override - public void render(FunctionRenderContext context) { - context.addArgument(0); - context.addChunk(" @> "); - context.addArgument(1); - } - } - -} diff --git a/core/testsuite/src/test/hibernateold/com/blazebit/persistence/testsuite/Issue1018Test.java b/core/testsuite/src/test/hibernateold/com/blazebit/persistence/testsuite/Issue1018Test.java deleted file mode 100644 index e87b79f480..0000000000 --- a/core/testsuite/src/test/hibernateold/com/blazebit/persistence/testsuite/Issue1018Test.java +++ /dev/null @@ -1,150 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Blazebit - */ - -package com.blazebit.persistence.testsuite; - -import com.blazebit.persistence.testsuite.entity.LongSequenceEntity; -import org.hibernate.HibernateException; -import org.hibernate.annotations.Type; -import org.hibernate.annotations.TypeDef; -import org.hibernate.engine.spi.SessionImplementor; -import org.hibernate.engine.spi.SharedSessionContractImplementor; -import org.hibernate.usertype.UserType; -import org.junit.Test; - -import javax.persistence.Access; -import javax.persistence.AccessType; -import javax.persistence.Entity; -import java.io.Serializable; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.Types; - -/** - * @author Christian Beikov - * @since 1.5.0 - */ -public class Issue1018Test extends AbstractCoreTest { - - @Override - protected Class[] getEntityClasses() { - return new Class[] { - EnumTestEntity.class - }; - } - - public static enum MyEnum { - VAL1(10), - VAL2(20); - - private final int value; - - MyEnum(int value) { - this.value = value; - } - - public int getValue() { - return value; - } - - public static MyEnum byValue(int value) { - switch (value) { - case 10: return VAL1; - case 20: return VAL2; - } - return null; - } - } - - public static class MyEnumUserType implements UserType { - - @Override - public Class returnedClass() { - return MyEnum.class; - } - - public Object nullSafeGet(ResultSet rs, String[] names, SharedSessionContractImplementor session, Object owner) throws HibernateException, SQLException { - return nullSafeGet(rs, names, (SessionImplementor) null, owner); - } - - public Object nullSafeGet(ResultSet rs, String[] names, SessionImplementor session, Object owner) throws HibernateException, SQLException { - int id = rs.getInt(names[0]); - if (rs.wasNull()) { - return null; - } - return MyEnum.byValue(id); - } - - public void nullSafeSet(PreparedStatement st, Object value, int index, SharedSessionContractImplementor session) throws HibernateException, SQLException { - nullSafeSet(st, value, index, (SessionImplementor) null); - } - - public void nullSafeSet(PreparedStatement st, Object value, int index, SessionImplementor session) throws HibernateException, SQLException { - if (value == null) { - st.setNull(index, Types.INTEGER); - } else { - st.setInt(index, ((MyEnum) value).getValue()); - } - } - - @Override - public Object assemble(Serializable cached, Object owner) throws HibernateException { - return cached; - } - - @Override - public Object deepCopy(Object value) throws HibernateException { - return value; - } - - @Override - public Serializable disassemble(Object value) throws HibernateException { - return (Serializable) value; - } - - @Override - public boolean equals(Object x, Object y) throws HibernateException { - return x == y; - } - - @Override - public int hashCode(Object x) throws HibernateException { - return x == null ? 0 : x.hashCode(); - } - - @Override - public boolean isMutable() { - return false; - } - - @Override - public Object replace(Object original, Object target, Object owner) throws HibernateException { - return original; - } - - @Override - public int[] sqlTypes() { - return new int[] { java.sql.Types.INTEGER }; - } - - } - - @Entity(name = "EnumTestEntity") - @Access(AccessType.FIELD) - @TypeDef(name = "MyEnumUserType", typeClass = MyEnumUserType.class) - public static class EnumTestEntity extends LongSequenceEntity { - @Type(type = "MyEnumUserType") - MyEnum myEnum; - } - - @Test - public void testEnumLiteral() { - cbf.create(em, EnumTestEntity.class) - .where("myEnum").inLiterals(MyEnum.VAL1, MyEnum.VAL2) - .whereExpression("myEnum = " + MyEnum.class.getName() + ".VAL1") - .getResultList(); - } -} diff --git a/core/testsuite/src/test/hibernateold/com/blazebit/persistence/testsuite/Issue545Test.java b/core/testsuite/src/test/hibernateold/com/blazebit/persistence/testsuite/Issue545Test.java deleted file mode 100644 index e886f4013a..0000000000 --- a/core/testsuite/src/test/hibernateold/com/blazebit/persistence/testsuite/Issue545Test.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Blazebit - */ - -package com.blazebit.persistence.testsuite; - -import com.blazebit.persistence.testsuite.tx.TxVoidWork; -import com.vladmihalcea.hibernate.type.basic.NullableCharacterType; -import org.hibernate.annotations.Formula; -import org.hibernate.annotations.Type; -import org.hibernate.annotations.TypeDef; -import org.junit.Before; -import org.junit.Test; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.EntityManager; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.Table; - -/** - * @author Jan-Willem Gmelig Meyling - * @since 1.2.1 - */ -public class Issue545Test extends AbstractCoreTest { - - @Override - protected Class[] getEntityClasses() { - return new Class[] { EntityWithCustomType.class }; - } - - @Before - public void setUp() throws Exception { - transactional(new TxVoidWork() { - @Override - public void work(EntityManager em) { - EntityWithCustomType entityWithCustomType = new EntityWithCustomType(); - entityWithCustomType.customValue = 'c'; - em.persist(entityWithCustomType); - em.flush(); - em.clear(); - } - }); - } - - @Test - public void queryEntityWithCustomTypeTest() { - transactional(new TxVoidWork() { - @Override - public void work(EntityManager em) { - cbf.create(em, EntityWithCustomType.class) - .where("transformedCustomValue").eq('C') - .getSingleResult(); - } - }); - } - - @Entity - @Table(name = "ewct") - @TypeDef(name = "CustomType", typeClass = NullableCharacterType.class) - public static class EntityWithCustomType { - - @Id - @GeneratedValue(strategy = GenerationType.AUTO) - private Long id; - - @Type(type = "CustomType") - @Column(name = "custom_value") - private Character customValue; - - @Formula("UPPER(custom_value)") - @Type(type = "CustomType") - private Character transformedCustomValue; - - } - -} diff --git a/core/testsuite/src/test/hibernateold/com/blazebit/persistence/testsuite/Issue992Test.java b/core/testsuite/src/test/hibernateold/com/blazebit/persistence/testsuite/Issue992Test.java deleted file mode 100644 index 98383df872..0000000000 --- a/core/testsuite/src/test/hibernateold/com/blazebit/persistence/testsuite/Issue992Test.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Blazebit - */ - -package com.blazebit.persistence.testsuite; - -import com.blazebit.persistence.CTE; -import com.vladmihalcea.hibernate.type.json.internal.JsonStringSqlTypeDescriptor; -import org.hibernate.annotations.Type; -import org.hibernate.annotations.TypeDef; -import org.junit.Test; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import java.util.Map; - -/** - * @author Jan-Willem Gmelig Meyling - * @since 1.4.1 - */ -public class Issue992Test extends AbstractCoreTest { - - @Override - protected Class[] getEntityClasses() { - return new Class[]{ BasicEntity.class, JsonCTE.class }; - } - - @Entity(name = "BasicEntity") - @TypeDef(name = "json", typeClass = JsonStringSqlTypeDescriptor.class) - public static class BasicEntity { - @Id - Long key1; - - @Type(type = "json") - Map attributeValues; - - } - - @CTE - @Entity(name = "JsonCTE") - @TypeDef(name = "json", typeClass = JsonStringSqlTypeDescriptor.class) - public static class JsonCTE { - @Id - Long key1; - - @Type(type = "json") - Map attributeValues; - - } - - @Test - public void test1() { - cbf.create(em, JsonCTE.class) - .with(JsonCTE.class) - .from(BasicEntity.class) - .bind("key1").select("key1") - .bind("attributeValues").select("NULL") - .end() - .getResultList(); - } - -} diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/AdvancedQueryCachingTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/AdvancedQueryCachingTest.java index a05776bbf2..4fd213ee73 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/AdvancedQueryCachingTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/AdvancedQueryCachingTest.java @@ -5,15 +5,14 @@ package com.blazebit.persistence.testsuite; -import com.blazebit.persistence.testsuite.base.jpa.category.NoDatanucleus; -import com.blazebit.persistence.testsuite.base.jpa.category.NoEclipselink; -import com.blazebit.persistence.testsuite.base.jpa.category.NoOpenJPA; -import com.blazebit.persistence.testsuite.entity.Document; +import java.util.Arrays; +import java.util.Collection; + import org.junit.Test; import org.junit.experimental.categories.Category; -import java.util.Arrays; -import java.util.Collection; +import com.blazebit.persistence.testsuite.base.jpa.category.NoEclipselink; +import com.blazebit.persistence.testsuite.entity.Document; /** * @author Christian Beikov @@ -29,7 +28,7 @@ public class AdvancedQueryCachingTest extends AbstractCoreTest { */ @Test // NOTE: This uses advanced SQL that isn't supported for other JPA providers yet - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoEclipselink.class }) public void differentParameterListSizesShouldNotResultInQueryCacheHit() { toUpperDocumentNames(Arrays.asList(1L)); toUpperDocumentNames(Arrays.asList(1L, 2L)); diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/AliasBasedMapKeyDereferencingTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/AliasBasedMapKeyDereferencingTest.java index e7d6ee2a2d..1b9a6e63fb 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/AliasBasedMapKeyDereferencingTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/AliasBasedMapKeyDereferencingTest.java @@ -6,20 +6,15 @@ package com.blazebit.persistence.testsuite; import com.blazebit.persistence.CriteriaBuilder; -import com.blazebit.persistence.testsuite.base.jpa.category.NoDatanucleus; import com.blazebit.persistence.testsuite.base.jpa.category.NoEclipselink; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate42; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate43; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate50; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate51; import org.junit.Test; import org.junit.experimental.categories.Category; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.ManyToOne; -import javax.persistence.OneToMany; -import javax.persistence.Table; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.OneToMany; +import jakarta.persistence.Table; import java.util.HashMap; import java.util.Map; @@ -42,7 +37,7 @@ protected Class[] getEntityClasses() { } @Test - @Category({NoDatanucleus.class, NoHibernate42.class, NoHibernate43.class, NoHibernate50.class, NoHibernate50.class, NoHibernate51.class, NoEclipselink.class}) + @Category({NoEclipselink.class}) public void test() { CriteriaBuilder crit = cbf.create(em, RootEntity.class, "root") .innerJoin("container", "container_1") diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/ArrayExpressionTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/ArrayExpressionTest.java index cbac0d2295..adacbe4e6d 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/ArrayExpressionTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/ArrayExpressionTest.java @@ -7,20 +7,13 @@ import com.blazebit.persistence.CriteriaBuilder; import com.blazebit.persistence.parser.expression.ArrayExpression; -import com.blazebit.persistence.testsuite.base.jpa.category.NoDatanucleus; -import com.blazebit.persistence.testsuite.base.jpa.category.NoDatanucleus4; import com.blazebit.persistence.testsuite.base.jpa.category.NoEclipselink; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate42; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate43; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate50; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate51; -import com.blazebit.persistence.testsuite.base.jpa.category.NoOpenJPA; import com.blazebit.persistence.testsuite.entity.Document; import com.blazebit.persistence.testsuite.entity.Person; import org.junit.Test; import org.junit.experimental.categories.Category; -import javax.persistence.Tuple; +import jakarta.persistence.Tuple; import static org.junit.Assert.assertEquals; @@ -237,9 +230,7 @@ public void testPredicateIndexReuseBase() { criteria.getResultList(); } - // NOTE: Older Hibernate versions don't like the IS NULL predicate when applied to an association in the ON clause @Test - @Category({ NoHibernate42.class, NoHibernate43.class, NoHibernate50.class, NoHibernate51.class, NoDatanucleus4.class }) public void testNewImplicitRoot() { CriteriaBuilder criteria = cbf.create(em, Person.class).from(Document.class, "d"); criteria.select("d.contacts[friend IS NULL]"); @@ -251,8 +242,6 @@ public void testNewImplicitRoot() { } @Test - // NOTE: Requires entity joins which are supported since Hibernate 5.1, Datanucleus 5 and latest Eclipselink - @Category({ NoHibernate42.class, NoHibernate43.class, NoHibernate50.class, NoDatanucleus4.class, NoOpenJPA.class }) public void testEntityArray() { CriteriaBuilder criteria = cbf.create(em, Person.class).from(Document.class, "d"); criteria.select("Person[name = d.name]"); @@ -264,8 +253,6 @@ public void testEntityArray() { } @Test - // NOTE: Requires entity joins which are supported since Hibernate 5.1, Datanucleus 5 and latest Eclipselink - @Category({ NoHibernate42.class, NoHibernate43.class, NoHibernate50.class, NoDatanucleus4.class, NoOpenJPA.class }) public void testEntityArrayReuse() { CriteriaBuilder criteria = cbf.create(em, Tuple.class).from(Document.class, "d"); criteria.select("Person[name = d.name].id"); diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/CTEEntityInheritanceCheckTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/CTEEntityInheritanceCheckTest.java index c5bdc65bc2..5ef116a2d4 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/CTEEntityInheritanceCheckTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/CTEEntityInheritanceCheckTest.java @@ -5,24 +5,21 @@ package com.blazebit.persistence.testsuite; -import com.blazebit.persistence.CTE; -import com.blazebit.persistence.CriteriaBuilder; -import com.blazebit.persistence.testsuite.base.jpa.category.NoDatanucleus; -import com.blazebit.persistence.testsuite.base.jpa.category.NoEclipselink; -import com.blazebit.persistence.testsuite.base.jpa.category.NoOpenJPA; import org.junit.Assert; import org.junit.Test; import org.junit.experimental.categories.Category; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.PersistenceException; +import com.blazebit.persistence.CTE; +import com.blazebit.persistence.testsuite.base.jpa.category.NoEclipselink; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.PersistenceException; /** * @author Moritz Becker * @since 1.4.0 */ -@Category({NoDatanucleus.class, NoOpenJPA.class, NoEclipselink.class}) +@Category({ NoEclipselink.class }) public class CTEEntityInheritanceCheckTest extends AbstractCoreTest { @Override diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/CTEQueryResultCachingTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/CTEQueryResultCachingTest.java index da7875fde2..0745b97eef 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/CTEQueryResultCachingTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/CTEQueryResultCachingTest.java @@ -5,23 +5,22 @@ package com.blazebit.persistence.testsuite; -import com.blazebit.persistence.testsuite.base.jpa.category.NoDatanucleus; +import java.util.Properties; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.junit.experimental.categories.Category; + import com.blazebit.persistence.testsuite.base.jpa.category.NoEclipselink; import com.blazebit.persistence.testsuite.base.jpa.category.NoMySQL; -import com.blazebit.persistence.testsuite.base.jpa.category.NoOpenJPA; import com.blazebit.persistence.testsuite.entity.Document; import com.blazebit.persistence.testsuite.entity.IntIdEntity; import com.blazebit.persistence.testsuite.entity.Person; import com.blazebit.persistence.testsuite.entity.RecursiveEntity; import com.blazebit.persistence.testsuite.entity.TestCTE; import com.blazebit.persistence.testsuite.entity.Version; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import javax.persistence.TypedQuery; -import java.util.Properties; +import jakarta.persistence.TypedQuery; /** * @author Jan-Willem Gmelig Meyling @@ -60,7 +59,7 @@ public final void tearDown() { } @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class, NoMySQL.class }) + @Category({ NoEclipselink.class, NoMySQL.class }) public void cteQueryResultCachingTest() { TypedQuery query = cbf.create(em, TestCTE.class).with(TestCTE.class) .from(RecursiveEntity.class, "e") diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/CTETest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/CTETest.java index 4b2b84c554..fe7b995723 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/CTETest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/CTETest.java @@ -5,30 +5,28 @@ package com.blazebit.persistence.testsuite; +import java.util.List; + +import org.junit.Test; +import org.junit.experimental.categories.Category; + import com.blazebit.persistence.CriteriaBuilder; import com.blazebit.persistence.FullSelectCTECriteriaBuilder; import com.blazebit.persistence.LeafOngoingSetOperationCTECriteriaBuilder; import com.blazebit.persistence.PagedList; import com.blazebit.persistence.PaginatedCriteriaBuilder; import com.blazebit.persistence.impl.BuilderChainingException; -import com.blazebit.persistence.testsuite.base.jpa.category.NoDatanucleus; import com.blazebit.persistence.testsuite.base.jpa.category.NoEclipselink; import com.blazebit.persistence.testsuite.base.jpa.category.NoH2; import com.blazebit.persistence.testsuite.base.jpa.category.NoMySQL; -import com.blazebit.persistence.testsuite.base.jpa.category.NoMySQLOld; -import com.blazebit.persistence.testsuite.base.jpa.category.NoOpenJPA; import com.blazebit.persistence.testsuite.base.jpa.category.NoOracle; import com.blazebit.persistence.testsuite.entity.RecursiveEntity; import com.blazebit.persistence.testsuite.entity.TestAdvancedCTE1; import com.blazebit.persistence.testsuite.entity.TestAdvancedCTE2; import com.blazebit.persistence.testsuite.entity.TestCTE; import com.blazebit.persistence.testsuite.tx.TxVoidWork; -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import javax.persistence.EntityManager; -import javax.persistence.Tuple; -import java.util.List; +import jakarta.persistence.EntityManager; +import jakarta.persistence.Tuple; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; @@ -73,7 +71,7 @@ public void work(EntityManager em) { } @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class, NoMySQLOld.class }) + @Category({ NoEclipselink.class }) public void testBindingNull() { CriteriaBuilder cb = cbf.create(em, TestAdvancedCTE1.class, "t").where("t.level").ltExpression("2"); cb.with(TestAdvancedCTE1.class, false) @@ -89,7 +87,7 @@ public void testBindingNull() { } @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class, NoMySQLOld.class }) + @Category({ NoEclipselink.class }) public void testNotFullyBoundCTE() { CriteriaBuilder cb = cbf.create(em, TestCTE.class, "t"); FullSelectCTECriteriaBuilder> fullSelectCTECriteriaBuilder = cb.with(TestCTE.class, false) @@ -103,7 +101,7 @@ public void testNotFullyBoundCTE() { } @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class, NoMySQLOld.class }) + @Category({ NoEclipselink.class }) public void testNotFullyBoundCTEOnSetOperation() { CriteriaBuilder cb = cbf.create(em, TestCTE.class); FullSelectCTECriteriaBuilder> builder = cb.with(TestCTE.class, false) @@ -115,7 +113,7 @@ public void testNotFullyBoundCTEOnSetOperation() { } @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class, NoMySQLOld.class }) + @Category({ NoEclipselink.class }) public void testNotFullyBoundCTEOnSecondSetOperation() { CriteriaBuilder cb = cbf.create(em, TestCTE.class); LeafOngoingSetOperationCTECriteriaBuilder> builder = cb.with(TestCTE.class, false) @@ -134,7 +132,7 @@ public void testNotFullyBoundCTEOnSecondSetOperation() { } @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class, NoMySQLOld.class }) + @Category({ NoEclipselink.class }) public void testNotDefinedCTE() { CriteriaBuilder cb = cbf.create(em, TestCTE.class, "t"); @@ -144,7 +142,7 @@ public void testNotDefinedCTE() { } @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class, NoMySQLOld.class }) + @Category({ NoEclipselink.class }) public void testCTE() { CriteriaBuilder cb = cbf.create(em, TestCTE.class, "t").where("t.level").ltExpression("2"); cb.with(TestCTE.class, false) @@ -167,7 +165,7 @@ public void testCTE() { } @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class, NoMySQLOld.class }) + @Category({ NoEclipselink.class }) public void testCTEAdvanced() { CriteriaBuilder cb = cbf.create(em, TestAdvancedCTE1.class, "t").where("t.level").ltExpression("2"); cb.with(TestAdvancedCTE1.class, false) @@ -196,7 +194,7 @@ public void testCTEAdvanced() { // NOTE: Apparently H2 doesn't like limit in CTEs @Test - @Category({ NoH2.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class, NoMySQLOld.class }) + @Category({ NoH2.class, NoEclipselink.class }) public void testCTELimit() { CriteriaBuilder cb = cbf.create(em, TestCTE.class, "t"); cb.with(TestCTE.class, false) @@ -222,7 +220,7 @@ public void testCTELimit() { // TODO: Oracle requires a cycle clause #295 @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class, NoMySQLOld.class, NoOracle.class }) + @Category({ NoEclipselink.class, NoOracle.class }) public void testRecursiveCTE() { CriteriaBuilder cb = cbf.create(em, TestCTE.class, "t").where("t.level").ltExpression("2"); cb.withRecursive(TestCTE.class) @@ -256,7 +254,7 @@ public void testRecursiveCTE() { // TODO: Oracle requires a cycle clause #295 @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class, NoMySQLOld.class, NoOracle.class }) + @Category({ NoEclipselink.class, NoOracle.class }) public void testPaginationWithRecursiveCte() { CriteriaBuilder cb = cbf.create(em, RecursiveEntity.class).orderByAsc("id"); // The CTE doesn't really matter, it's just there to trigger #570 @@ -283,7 +281,7 @@ public void testPaginationWithRecursiveCte() { // TODO: Oracle requires a cycle clause #295 @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class, NoMySQLOld.class, NoOracle.class }) + @Category({ NoEclipselink.class, NoOracle.class }) public void testRecursiveCTEAdvanced() { CriteriaBuilder cb = cbf.create(em, TestAdvancedCTE1.class, "t").where("t.level").ltExpression("2"); cb.withRecursive(TestAdvancedCTE1.class) @@ -325,7 +323,7 @@ public void testRecursiveCTEAdvanced() { // TODO: Oracle requires a cycle clause #295 @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class, NoMySQLOld.class, NoOracle.class }) + @Category({ NoEclipselink.class, NoOracle.class }) public void testRecursiveCTEPagination() { CriteriaBuilder cb = cbf.create(em, TestCTE.class); cb.withRecursive(TestCTE.class) @@ -397,7 +395,7 @@ public void testRecursiveCTEPagination() { // NOTE: Apparently H2 before 1.4.199 produces wrong results when a CTE is used with IN predicate // TODO: Oracle requires a cycle clause #295 @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class, NoMySQLOld.class, NoOracle.class }) + @Category({ NoEclipselink.class, NoOracle.class }) public void testRecursiveCTEPaginationIdQuery() { CriteriaBuilder cb = cbf.create(em, Tuple.class); cb.withRecursive(TestCTE.class) @@ -495,7 +493,7 @@ public void testRecursiveCTEPaginationIdQuery() { // TODO: Oracle requires a cycle clause #295 @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class, NoMySQLOld.class, NoOracle.class }) + @Category({ NoEclipselink.class, NoOracle.class }) public void testRecursiveCTEPaginationIdQueryLeftJoin() { CriteriaBuilder cb = cbf.create(em, Tuple.class); cb.withRecursive(TestCTE.class) @@ -588,7 +586,7 @@ public void testRecursiveCTEPaginationIdQueryLeftJoin() { // NOTE: Apparently H2 before 1.4.199 can't handle multiple CTEs @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class, NoMySQLOld.class }) + @Category({ NoEclipselink.class }) public void testCTEInSubquery() { CriteriaBuilder cb = cbf.create(em, String.class) .from(RecursiveEntity.class, "r") @@ -619,7 +617,7 @@ public void testCTEInSubquery() { // NOTE: Apparently H2 can't handle multiple CTEs @Test - @Category({ NoH2.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class, NoMySQLOld.class }) + @Category({ NoH2.class, NoEclipselink.class }) public void testBindEmbeddable() { CriteriaBuilder cb = cbf.create(em, TestAdvancedCTE2.class); cb.with(TestAdvancedCTE1.class, false) @@ -659,7 +657,7 @@ public void testBindEmbeddable() { } @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class, NoMySQLOld.class }) + @Category({ NoEclipselink.class }) public void testBindEmbeddableWithNullBindingsForJoinableAttributes() { CriteriaBuilder cb = cbf.create(em, TestAdvancedCTE1.class); cb.with(TestAdvancedCTE1.class, false) @@ -693,7 +691,7 @@ public void testBindEmbeddableWithNullBindingsForJoinableAttributes() { } @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class, NoMySQLOld.class }) + @Category({ NoEclipselink.class }) public void testWithStartSetEmptyRightSide() { CriteriaBuilder cb = cbf.create(em, TestAdvancedCTE1.class); cb.withStartSet(TestAdvancedCTE1.class, false) @@ -718,7 +716,7 @@ public void testWithStartSetEmptyRightSide() { } @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class, NoMySQLOld.class }) + @Category({ NoEclipselink.class }) public void testWithStartSetEmptyRightSideLeaf() { CriteriaBuilder cb = cbf.create(em, TestAdvancedCTE1.class); cb.withStartSet(TestAdvancedCTE1.class, false) @@ -745,7 +743,7 @@ public void testWithStartSetEmptyRightSideLeaf() { @Test // NOTE: H2 does not support the PARTITION clause in the ROW_NUMBER function, so we can't emulate EXCEPT ALL - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class, NoH2.class, NoMySQL.class }) + @Category({ NoEclipselink.class, NoH2.class }) public void testWithStartSetEmptyLeftSideLeaf() { CriteriaBuilder cb = cbf.create(em, TestCTE.class) .withStartSet(TestCTE.class, false) @@ -774,7 +772,7 @@ public void testWithStartSetEmptyLeftSideLeaf() { } @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class, NoMySQLOld.class }) + @Category({ NoEclipselink.class }) public void testBuilderEndTracking() { FullSelectCTECriteriaBuilder> cb = cbf.create(em, TestCTE.class).with(TestCTE.class, false); cb.from(RecursiveEntity.class, "e") @@ -793,7 +791,7 @@ public void testBuilderEndTracking() { // from issue #513 @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class, NoMySQLOld.class }) + @Category({ NoEclipselink.class }) public void testNestedSizeInCte() { CriteriaBuilder cb = cbf.create(em, Long.class) .with(TestCTE.class, false) @@ -815,7 +813,7 @@ public void testNestedSizeInCte() { // For issue #1563 @Test // NOTE: MySQL doesn't support nesting set operands i.e. `q1 union (q2 union q3)` is illegal, but `q1 union q2 union q3` is fine. Let's ignore that for now - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class, NoMySQL.class }) + @Category({ NoEclipselink.class, NoMySQL.class }) public void testInlineInSetOperand() { CriteriaBuilder cb = cbf.create(em, Object[].class); cb.with(TestAdvancedCTE1.class, true) diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/CaseWhenTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/CaseWhenTest.java index 89ff0bc2a2..d3d278c296 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/CaseWhenTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/CaseWhenTest.java @@ -7,7 +7,7 @@ import static org.junit.Assert.assertEquals; -import javax.persistence.Tuple; +import jakarta.persistence.Tuple; import org.junit.Test; diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/CollectionJoinTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/CollectionJoinTest.java index c9e26c9a11..013c06e1be 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/CollectionJoinTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/CollectionJoinTest.java @@ -6,13 +6,8 @@ package com.blazebit.persistence.testsuite; import com.blazebit.persistence.CriteriaBuilder; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate42; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate43; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate50; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate51; import com.blazebit.persistence.testsuite.entity.*; import org.junit.Test; -import org.junit.experimental.categories.Category; import static org.junit.Assert.assertEquals; @@ -91,8 +86,6 @@ public void testManyToManyJoinTableDuplicateName() { } @Test - // NOTE: http://hibernate.atlassian.net/browse/HHH-10229 - @Category({ NoHibernate42.class, NoHibernate43.class, NoHibernate50.class, NoHibernate51.class }) public void testElementCollection() { CriteriaBuilder criteria = cbf.create(em, Object[].class); criteria.from(Root.class, "r"); diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/CollectionRoleDeleteTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/CollectionRoleDeleteTest.java index a3367db5cd..4e3dcf80ad 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/CollectionRoleDeleteTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/CollectionRoleDeleteTest.java @@ -5,13 +5,15 @@ package com.blazebit.persistence.testsuite; +import org.junit.Before; +import org.junit.Test; +import org.junit.experimental.categories.Category; + import com.blazebit.persistence.DeleteCriteriaBuilder; import com.blazebit.persistence.ReturningResult; -import com.blazebit.persistence.testsuite.base.jpa.category.NoDatanucleus; import com.blazebit.persistence.testsuite.base.jpa.category.NoEclipselink; import com.blazebit.persistence.testsuite.base.jpa.category.NoH2; import com.blazebit.persistence.testsuite.base.jpa.category.NoMySQL; -import com.blazebit.persistence.testsuite.base.jpa.category.NoOpenJPA; import com.blazebit.persistence.testsuite.entity.IndexedEmbeddable; import com.blazebit.persistence.testsuite.entity.IndexedNode; import com.blazebit.persistence.testsuite.entity.KeyedEmbeddable; @@ -25,16 +27,10 @@ import com.blazebit.persistence.testsuite.entity.Sub2Sub1; import com.blazebit.persistence.testsuite.entity.Sub2Sub2; import com.blazebit.persistence.testsuite.tx.TxVoidWork; -import org.junit.Before; -import org.junit.Ignore; -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import javax.persistence.EntityManager; -import javax.persistence.Tuple; +import jakarta.persistence.EntityManager; +import jakarta.persistence.Tuple; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; /** * @@ -42,7 +38,7 @@ * @since 1.2.0 */ // NOTE: No advanced sql support for datanucleus, eclipselink and openjpa yet -@Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) +@Category({ NoEclipselink.class }) public class CollectionRoleDeleteTest extends AbstractCoreTest { @Before @@ -126,7 +122,7 @@ public void work(EntityManager em) { } @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoEclipselink.class }) public void deleteIndexedImplicitJoin() { DeleteCriteriaBuilder criteria = cbf.deleteCollection(em, Root.class, "r", "indexedNodes"); criteria.where("r.name").eq("r"); @@ -143,7 +139,7 @@ public void deleteIndexedImplicitJoin() { } @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoEclipselink.class }) public void deleteIndexedMultipleDeepImplicitJoin() { DeleteCriteriaBuilder criteria = cbf.deleteCollection(em, Root.class, "r", "indexedNodes"); criteria.where("r.name").eq("r"); @@ -164,7 +160,7 @@ public void deleteIndexedMultipleDeepImplicitJoin() { // NOTE: H2 and MySQL only support returning generated keys @Test - @Category({ NoH2.class, NoMySQL.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoH2.class, NoMySQL.class, NoEclipselink.class }) public void deleteIndexedReturning() { transactional(new TxVoidWork() { @Override diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/CollectionRoleInsertTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/CollectionRoleInsertTest.java index c12e5de197..b0a804d5a4 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/CollectionRoleInsertTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/CollectionRoleInsertTest.java @@ -5,13 +5,17 @@ package com.blazebit.persistence.testsuite; +import java.util.Collections; + +import org.junit.Before; +import org.junit.Test; +import org.junit.experimental.categories.Category; + import com.blazebit.persistence.InsertCriteriaBuilder; import com.blazebit.persistence.ReturningResult; -import com.blazebit.persistence.testsuite.base.jpa.category.NoDatanucleus; import com.blazebit.persistence.testsuite.base.jpa.category.NoEclipselink; import com.blazebit.persistence.testsuite.base.jpa.category.NoH2; import com.blazebit.persistence.testsuite.base.jpa.category.NoMySQL; -import com.blazebit.persistence.testsuite.base.jpa.category.NoOpenJPA; import com.blazebit.persistence.testsuite.base.jpa.category.NoOracle; import com.blazebit.persistence.testsuite.entity.IndexedEmbeddable; import com.blazebit.persistence.testsuite.entity.IndexedNode; @@ -26,14 +30,8 @@ import com.blazebit.persistence.testsuite.entity.Sub2Sub1; import com.blazebit.persistence.testsuite.entity.Sub2Sub2; import com.blazebit.persistence.testsuite.tx.TxVoidWork; -import org.junit.Before; -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import javax.persistence.EntityManager; -import javax.persistence.Tuple; - -import java.util.Collections; +import jakarta.persistence.EntityManager; +import jakarta.persistence.Tuple; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; @@ -44,7 +42,7 @@ * @since 1.2.0 */ // NOTE: No advanced sql support for datanucleus, eclipselink and openjpa yet -@Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) +@Category({ NoEclipselink.class }) public class CollectionRoleInsertTest extends AbstractCoreTest { private static final Integer I2_ID = 4; @@ -185,7 +183,7 @@ public void work(EntityManager em) { // NOTE: Oracle doesn't support the RETURNING clause for INSERT .. SELECT statements, only for INSERT .. VALUES // https://stackoverflow.com/questions/5325033/plsql-insert-into-with-subquery-and-returning-clause-oracle @Test - @Category({ NoH2.class, NoMySQL.class, NoOracle.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoH2.class, NoMySQL.class, NoOracle.class, NoEclipselink.class }) public void insertIndexedReturning() { transactional(new TxVoidWork() { @Override @@ -446,7 +444,7 @@ public void work(EntityManager em) { // NOTE: Oracle doesn't support the RETURNING clause for INSERT .. SELECT statements, only for INSERT .. VALUES // https://stackoverflow.com/questions/5325033/plsql-insert-into-with-subquery-and-returning-clause-oracle @Test - @Category({ NoH2.class, NoMySQL.class, NoOracle.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoH2.class, NoMySQL.class, NoOracle.class, NoEclipselink.class }) public void insertIndexedReturningWithParams() { transactional(new TxVoidWork() { @Override diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/CollectionRoleInverseDeleteTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/CollectionRoleInverseDeleteTest.java index 2fdec94f5b..4d5bdcc6cd 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/CollectionRoleInverseDeleteTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/CollectionRoleInverseDeleteTest.java @@ -5,38 +5,37 @@ package com.blazebit.persistence.testsuite; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.TreeSet; + +import org.junit.Before; +import org.junit.Ignore; +import org.junit.Test; +import org.junit.experimental.categories.Category; + import com.blazebit.persistence.CriteriaBuilder; import com.blazebit.persistence.DeleteCriteriaBuilder; import com.blazebit.persistence.ReturningObjectBuilder; import com.blazebit.persistence.ReturningResult; import com.blazebit.persistence.SimpleReturningBuilder; -import com.blazebit.persistence.testsuite.base.jpa.category.NoDatanucleus; import com.blazebit.persistence.testsuite.base.jpa.category.NoEclipselink; -import com.blazebit.persistence.testsuite.base.jpa.category.NoFirebird; import com.blazebit.persistence.testsuite.base.jpa.category.NoH2; import com.blazebit.persistence.testsuite.base.jpa.category.NoMSSQL; import com.blazebit.persistence.testsuite.base.jpa.category.NoMySQL; -import com.blazebit.persistence.testsuite.base.jpa.category.NoOpenJPA; import com.blazebit.persistence.testsuite.base.jpa.category.NoOracle; -import com.blazebit.persistence.testsuite.base.jpa.category.NoSQLite; import com.blazebit.persistence.testsuite.entity.Document; import com.blazebit.persistence.testsuite.entity.IdHolderCTE; import com.blazebit.persistence.testsuite.entity.Person; import com.blazebit.persistence.testsuite.tx.TxVoidWork; -import org.junit.Before; -import org.junit.Ignore; -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import javax.persistence.EntityManager; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashSet; -import java.util.List; -import java.util.Set; -import java.util.TreeSet; +import jakarta.persistence.EntityManager; -import static org.junit.Assert.*; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; /** * @@ -82,7 +81,7 @@ public void work(EntityManager em) { } @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoEclipselink.class }) public void testSimple() { transactional(new TxVoidWork() { @Override @@ -108,7 +107,7 @@ public void work(EntityManager em) { // NOTE: H2 and MySQL only support returning generated keys @Test - @Category({ NoH2.class, NoMySQL.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoH2.class, NoMySQL.class, NoEclipselink.class }) public void testReturningAll() { transactional(new TxVoidWork() { @Override @@ -136,7 +135,7 @@ public void work(EntityManager em) { // NOTE: H2 and MySQL only support returning generated keys @Test - @Category({ NoH2.class, NoMySQL.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoH2.class, NoMySQL.class, NoEclipselink.class }) public void testReturningAllObjectBuilder() { transactional(new TxVoidWork() { @Override @@ -181,7 +180,7 @@ public List buildList(List list) { @Test // NOTE: No returning support yet for collection DML for inverse deletes @Ignore - @Category({ NoH2.class, NoMySQL.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoH2.class, NoMySQL.class, NoEclipselink.class }) public void testReturningLast() { transactional(new TxVoidWork() { @Override @@ -209,7 +208,7 @@ public void work(EntityManager em) { @Test // NOTE: No returning support yet for collection DML for inverse deletes @Ignore - @Category({ NoH2.class, NoOracle.class, NoMSSQL.class, NoSQLite.class, NoFirebird.class, NoMySQL.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoH2.class, NoOracle.class, NoMSSQL.class, NoMySQL.class, NoEclipselink.class }) public void testDeleteReturningSelectOld() { transactional(new TxVoidWork() { @Override @@ -250,7 +249,7 @@ public void work(EntityManager em) { @Test // NOTE: No returning support yet for collection DML for inverse deletes @Ignore - @Category({ NoH2.class, NoOracle.class, NoMSSQL.class, NoSQLite.class, NoFirebird.class, NoMySQL.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoH2.class, NoOracle.class, NoMSSQL.class, NoMySQL.class, NoEclipselink.class }) public void testDeleteReturningSelectNew() { transactional(new TxVoidWork() { @Override diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/CollectionRoleUpdateTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/CollectionRoleUpdateTest.java index 520efa7321..45b081aff2 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/CollectionRoleUpdateTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/CollectionRoleUpdateTest.java @@ -5,16 +5,17 @@ package com.blazebit.persistence.testsuite; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; +import org.junit.experimental.categories.Category; + import com.blazebit.persistence.ReturningResult; import com.blazebit.persistence.UpdateCriteriaBuilder; import com.blazebit.persistence.testsuite.base.jpa.category.NoDB2; -import com.blazebit.persistence.testsuite.base.jpa.category.NoDatanucleus; import com.blazebit.persistence.testsuite.base.jpa.category.NoEclipselink; import com.blazebit.persistence.testsuite.base.jpa.category.NoH2; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate42; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate43; import com.blazebit.persistence.testsuite.base.jpa.category.NoMySQL; -import com.blazebit.persistence.testsuite.base.jpa.category.NoOpenJPA; import com.blazebit.persistence.testsuite.base.jpa.category.NoOracle; import com.blazebit.persistence.testsuite.entity.IndexedEmbeddable; import com.blazebit.persistence.testsuite.entity.IndexedNode; @@ -30,13 +31,8 @@ import com.blazebit.persistence.testsuite.entity.Sub2Sub1; import com.blazebit.persistence.testsuite.entity.Sub2Sub2; import com.blazebit.persistence.testsuite.tx.TxVoidWork; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import javax.persistence.EntityManager; -import javax.persistence.Tuple; +import jakarta.persistence.EntityManager; +import jakarta.persistence.Tuple; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; @@ -47,7 +43,7 @@ * @since 1.2.0 */ // NOTE: No advanced sql support for datanucleus, eclipselink and openjpa yet -@Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) +@Category({ NoEclipselink.class }) public class CollectionRoleUpdateTest extends AbstractCoreTest { private static final Integer I2_ID = 4; @@ -156,7 +152,7 @@ public void work(EntityManager em) { } @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoEclipselink.class }) public void updateIndexedImplicitJoin() { transactional(new TxVoidWork() { @Override @@ -186,7 +182,7 @@ public void work(EntityManager em) { } @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoEclipselink.class }) public void updateIndexedMultipleDeepImplicitJoin() { transactional(new TxVoidWork() { @Override @@ -222,7 +218,7 @@ public void work(EntityManager em) { // NOTE: H2 and MySQL only support returning generated keys // NOTE: DB2 and Oracle do not support FROM FINAL TABLE or RETURNING with MERGE. Fix this with https://github.com/Blazebit/blaze-persistence/issues/1137 @Test - @Category({ NoH2.class, NoMySQL.class, NoDB2.class, NoOracle.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoH2.class, NoMySQL.class, NoDB2.class, NoOracle.class, NoEclipselink.class }) public void updateIndexedReturning() { transactional(new TxVoidWork() { @Override @@ -460,9 +456,8 @@ public void work(EntityManager em) { }); } - // NOTE: Hibernate 4.2 and 4.3 interprets entity name tokens in string literals... @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class, NoHibernate42.class, NoHibernate43.class }) + @Category({NoEclipselink.class}) public void updateKeyedWithInlineCte() { transactional(new TxVoidWork() { @Override diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/ComplexExpressionTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/ComplexExpressionTest.java index b7c171faf4..69ef29b1ca 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/ComplexExpressionTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/ComplexExpressionTest.java @@ -11,7 +11,7 @@ import java.util.Collection; import java.util.Locale; -import javax.persistence.Tuple; +import jakarta.persistence.Tuple; import com.blazebit.persistence.testsuite.base.jpa.category.NoEclipselink; import org.junit.Test; diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/CountQueryTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/CountQueryTest.java index a1d9970738..7bb205f3ed 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/CountQueryTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/CountQueryTest.java @@ -5,19 +5,17 @@ package com.blazebit.persistence.testsuite; +import org.junit.Test; +import org.junit.experimental.categories.Category; + import com.blazebit.persistence.CriteriaBuilder; import com.blazebit.persistence.impl.function.alias.AliasFunction; -import com.blazebit.persistence.testsuite.base.jpa.category.NoDatanucleus; import com.blazebit.persistence.testsuite.base.jpa.category.NoEclipselink; -import com.blazebit.persistence.testsuite.base.jpa.category.NoOpenJPA; import com.blazebit.persistence.testsuite.entity.Document; import com.blazebit.persistence.testsuite.entity.Person; import com.blazebit.persistence.testsuite.tx.TxVoidWork; -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import javax.persistence.EntityManager; -import javax.persistence.Tuple; +import jakarta.persistence.EntityManager; +import jakarta.persistence.Tuple; import static org.junit.Assert.assertEquals; @@ -130,7 +128,7 @@ public void countQueryWithGroupBy() { // NOTE: This requires advanced SQL support @Test - @Category({ NoEclipselink.class, NoDatanucleus.class, NoOpenJPA.class }) + @Category({ NoEclipselink.class }) public void countQueryWithGroupByAndLimit() { CriteriaBuilder crit = cbf.create(em, Long.class) .from(Document.class, "d") @@ -150,7 +148,7 @@ public void countQueryWithGroupByAndLimit() { // NOTE: This requires advanced SQL support @Test - @Category({ NoEclipselink.class, NoDatanucleus.class, NoOpenJPA.class }) + @Category({ NoEclipselink.class }) public void countQueryFromHavingQuery() { CriteriaBuilder crit = cbf.create(em, Document.class, "d"); crit.select("d.id") @@ -186,7 +184,7 @@ public void countQueryWithDistinct() { } @Test - @Category({ NoEclipselink.class, NoDatanucleus.class, NoOpenJPA.class }) + @Category({ NoEclipselink.class }) // TODO: report eclipselink does not support subqueries in functions public void boundedCountQueryFromSimpleQuery() { CriteriaBuilder crit = cbf.create(em, Document.class, "d"); @@ -201,7 +199,7 @@ public void boundedCountQueryFromSimpleQuery() { } @Test - @Category({ NoEclipselink.class, NoDatanucleus.class, NoOpenJPA.class }) + @Category({ NoEclipselink.class }) // TODO: report eclipselink does not support subqueries in functions public void boundedCountQueryFromCollectionJoinQuery() { CriteriaBuilder crit = cbf.create(em, Tuple.class) diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/DateAddTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/DateAddTest.java index 90ed3c443c..5ef9b6e124 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/DateAddTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/DateAddTest.java @@ -12,8 +12,8 @@ import com.blazebit.persistence.testsuite.tx.TxVoidWork; import org.junit.Test; -import javax.persistence.EntityManager; -import javax.persistence.Tuple; +import jakarta.persistence.EntityManager; +import jakarta.persistence.Tuple; import java.util.Calendar; import java.util.Date; import java.util.List; diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/DateDiffTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/DateDiffTest.java index c3b804e2e3..6502e03f66 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/DateDiffTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/DateDiffTest.java @@ -14,9 +14,9 @@ import org.junit.Before; import org.junit.Test; -import javax.persistence.EntityManager; -import javax.persistence.TemporalType; -import javax.persistence.Tuple; +import jakarta.persistence.EntityManager; +import jakarta.persistence.TemporalType; +import jakarta.persistence.Tuple; import javax.sql.DataSource; import java.sql.Connection; import java.util.Calendar; diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/DateExtractTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/DateExtractTest.java index c6b2a814cd..2459180965 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/DateExtractTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/DateExtractTest.java @@ -6,6 +6,7 @@ package com.blazebit.persistence.testsuite; import com.blazebit.persistence.CriteriaBuilder; +import com.blazebit.persistence.testsuite.base.jpa.category.NoOracle; import com.blazebit.persistence.testsuite.entity.Document; import com.blazebit.persistence.testsuite.entity.Person; import com.blazebit.persistence.testsuite.entity.Version; @@ -14,11 +15,12 @@ import org.junit.AfterClass; import org.junit.Before; import org.junit.Test; +import org.junit.experimental.categories.Category; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; -import javax.persistence.EntityManager; -import javax.persistence.Tuple; +import jakarta.persistence.EntityManager; +import jakarta.persistence.Tuple; import javax.sql.DataSource; import java.sql.Connection; import java.util.Arrays; @@ -490,6 +492,8 @@ public void testDateExtractMicrosecond() { } @Test + // NOTE: Hibernate ORM has a bug: https://hibernate.atlassian.net/browse/HHH-18837 + @Category({ NoOracle.class }) public void testDateExtractEpoch() { // Set the client timezone TimeZone.setDefault(clientTimeZone); diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/DateTruncTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/DateTruncTest.java index c496d84d0d..70daa63833 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/DateTruncTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/DateTruncTest.java @@ -6,7 +6,7 @@ package com.blazebit.persistence.testsuite; import com.blazebit.persistence.CriteriaBuilder; -import com.blazebit.persistence.testsuite.base.jpa.category.NoH2Latest; +import com.blazebit.persistence.testsuite.base.jpa.category.NoH2; import com.blazebit.persistence.testsuite.entity.Document; import com.blazebit.persistence.testsuite.entity.Person; import com.blazebit.persistence.testsuite.entity.Version; @@ -14,8 +14,8 @@ import org.junit.Test; import org.junit.experimental.categories.Category; -import javax.persistence.EntityManager; -import javax.persistence.Tuple; +import jakarta.persistence.EntityManager; +import jakarta.persistence.Tuple; import java.util.Calendar; import java.util.Date; import java.util.List; @@ -243,7 +243,7 @@ public void testDateTruncSecond() { // NOTE: H2 2.0 changed the meaning of "week" to be locale sensitive: https://github.com/h2database/h2database/issues/3922 @Test - @Category({ NoH2Latest.class }) + @Category({ NoH2.class }) public void testDateTruncWeek() { CriteriaBuilder criteria = cbf.create(em, Tuple.class) .from(Document.class, "doc") diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/DeletePolymorphicTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/DeletePolymorphicTest.java index 8c019177b3..9ab0c289b5 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/DeletePolymorphicTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/DeletePolymorphicTest.java @@ -5,19 +5,21 @@ package com.blazebit.persistence.testsuite; +import java.util.List; + +import org.junit.Before; +import org.junit.Ignore; +import org.junit.Test; +import org.junit.experimental.categories.Category; + import com.blazebit.persistence.CriteriaBuilder; import com.blazebit.persistence.DeleteCriteriaBuilder; import com.blazebit.persistence.ReturningResult; -import com.blazebit.persistence.testsuite.base.jpa.category.NoDatanucleus; import com.blazebit.persistence.testsuite.base.jpa.category.NoEclipselink; -import com.blazebit.persistence.testsuite.base.jpa.category.NoFirebird; import com.blazebit.persistence.testsuite.base.jpa.category.NoH2; import com.blazebit.persistence.testsuite.base.jpa.category.NoMSSQL; import com.blazebit.persistence.testsuite.base.jpa.category.NoMySQL; -import com.blazebit.persistence.testsuite.base.jpa.category.NoMySQLOld; -import com.blazebit.persistence.testsuite.base.jpa.category.NoOpenJPA; import com.blazebit.persistence.testsuite.base.jpa.category.NoOracle; -import com.blazebit.persistence.testsuite.base.jpa.category.NoSQLite; import com.blazebit.persistence.testsuite.entity.IdHolderCTE; import com.blazebit.persistence.testsuite.entity.IntIdEntity; import com.blazebit.persistence.testsuite.entity.PolymorphicBase; @@ -28,17 +30,11 @@ import com.blazebit.persistence.testsuite.entity.PolymorphicSub2; import com.blazebit.persistence.testsuite.entity.StringIdCTE; import com.blazebit.persistence.testsuite.entity.TPCBase; -import com.blazebit.persistence.testsuite.entity.TPCSub2; import com.blazebit.persistence.testsuite.entity.TPCSub1; +import com.blazebit.persistence.testsuite.entity.TPCSub2; import com.blazebit.persistence.testsuite.tx.TxVoidWork; -import org.junit.Before; -import org.junit.Ignore; -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import javax.persistence.EntityManager; -import javax.persistence.Tuple; -import java.util.List; +import jakarta.persistence.EntityManager; +import jakarta.persistence.Tuple; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; @@ -168,9 +164,8 @@ public void work(EntityManager em) { } @Test - // NOTE: MySQL does not support CTEs // NOTE: H2 only supports with clause in select statement - @Category({ NoH2.class, NoMySQLOld.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoH2.class, NoEclipselink.class }) public void testTablePerClassWithCte() { transactional(new TxVoidWork() { @Override @@ -201,9 +196,8 @@ public void work(EntityManager em) { } @Test - // NOTE: MySQL does not support CTEs // NOTE: H2 only supports with clause in select statement - @Category({ NoH2.class, NoMySQLOld.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoH2.class, NoEclipselink.class }) public void testJoinedWithCte() { transactional(new TxVoidWork() { @Override @@ -234,9 +228,8 @@ public void work(EntityManager em) { } @Test - // NOTE: MySQL does not support CTEs // NOTE: H2 only supports with clause in select statement - @Category({ NoH2.class, NoMySQLOld.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoH2.class, NoEclipselink.class }) public void testSingleTableWithCte() { transactional(new TxVoidWork() { @Override @@ -268,7 +261,7 @@ public void work(EntityManager em) { @Test // NOTE: H2 and MySQL only support returning generated keys - @Category({ NoH2.class, NoMySQL.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoH2.class, NoMySQL.class, NoEclipselink.class }) public void testTablePerClassReturning() { transactional(new TxVoidWork() { @Override @@ -290,7 +283,7 @@ public void work(EntityManager em) { @Test // NOTE: H2 and MySQL only support returning generated keys - @Category({ NoH2.class, NoMySQL.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoH2.class, NoMySQL.class, NoEclipselink.class }) public void testJoinedReturning() { transactional(new TxVoidWork() { @Override @@ -312,7 +305,7 @@ public void work(EntityManager em) { @Test // NOTE: H2 and MySQL only support returning generated keys - @Category({ NoH2.class, NoMySQL.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoH2.class, NoMySQL.class, NoEclipselink.class }) public void testSingleTableReturning() { transactional(new TxVoidWork() { @Override @@ -334,7 +327,7 @@ public void work(EntityManager em) { // NOTE: Currently only PostgreSQL and DB2 support returning from within a CTE @Test - @Category({ NoH2.class, NoOracle.class, NoMSSQL.class, NoSQLite.class, NoFirebird.class, NoMySQL.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoH2.class, NoOracle.class, NoMSSQL.class, NoMySQL.class, NoEclipselink.class }) public void testTablePerClassReturningInCTE() { transactional(new TxVoidWork() { @Override @@ -366,7 +359,7 @@ public void work(EntityManager em) { // NOTE: Currently only PostgreSQL and DB2 support returning from within a CTE @Test - @Category({ NoH2.class, NoOracle.class, NoMSSQL.class, NoSQLite.class, NoFirebird.class, NoMySQL.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoH2.class, NoOracle.class, NoMSSQL.class, NoMySQL.class, NoEclipselink.class }) public void testJoinedReturningInCTE() { transactional(new TxVoidWork() { @Override @@ -398,7 +391,7 @@ public void work(EntityManager em) { // NOTE: Currently only PostgreSQL and DB2 support returning from within a CTE @Test - @Category({ NoH2.class, NoOracle.class, NoMSSQL.class, NoSQLite.class, NoFirebird.class, NoMySQL.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoH2.class, NoOracle.class, NoMSSQL.class, NoMySQL.class, NoEclipselink.class }) public void testSingleTableReturningInCTE() { transactional(new TxVoidWork() { @Override @@ -434,7 +427,7 @@ public void work(EntityManager em) { // NOTE: Currently only PostgreSQL and DB2 support returning from within a CTE @Test - @Category({ NoH2.class, NoOracle.class, NoMSSQL.class, NoSQLite.class, NoFirebird.class, NoMySQL.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoH2.class, NoOracle.class, NoMSSQL.class, NoMySQL.class, NoEclipselink.class }) public void testTablePerClassReturningInCTESelectOld() { transactional(new TxVoidWork() { @Override @@ -468,7 +461,7 @@ public void work(EntityManager em) { // NOTE: Currently only PostgreSQL and DB2 support returning from within a CTE @Test - @Category({ NoH2.class, NoOracle.class, NoMSSQL.class, NoSQLite.class, NoFirebird.class, NoMySQL.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoH2.class, NoOracle.class, NoMSSQL.class, NoMySQL.class, NoEclipselink.class }) public void testJoinedReturningInCTESelectOld() { transactional(new TxVoidWork() { @Override @@ -502,7 +495,7 @@ public void work(EntityManager em) { // NOTE: Currently only PostgreSQL and DB2 support returning from within a CTE @Test - @Category({ NoH2.class, NoOracle.class, NoMSSQL.class, NoSQLite.class, NoFirebird.class, NoMySQL.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoH2.class, NoOracle.class, NoMSSQL.class, NoMySQL.class, NoEclipselink.class }) public void testSingleTableReturningInCTESelectOld() { transactional(new TxVoidWork() { @Override @@ -537,7 +530,7 @@ public void work(EntityManager em) { // NOTE: Currently only PostgreSQL and DB2 support returning from within a CTE @Test - @Category({ NoH2.class, NoOracle.class, NoMSSQL.class, NoSQLite.class, NoFirebird.class, NoMySQL.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoH2.class, NoOracle.class, NoMSSQL.class, NoMySQL.class, NoEclipselink.class }) public void testTablePerClassReturningInCTESelectNew() { transactional(new TxVoidWork() { @Override @@ -576,7 +569,7 @@ public void work(EntityManager em) { // NOTE: Currently only PostgreSQL and DB2 support returning from within a CTE @Test - @Category({ NoH2.class, NoOracle.class, NoMSSQL.class, NoSQLite.class, NoFirebird.class, NoMySQL.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoH2.class, NoOracle.class, NoMSSQL.class, NoMySQL.class, NoEclipselink.class }) public void testJoinedReturningInCTESelectNew() { transactional(new TxVoidWork() { @Override @@ -615,7 +608,7 @@ public void work(EntityManager em) { // NOTE: Currently only PostgreSQL and DB2 support returning from within a CTE @Test - @Category({ NoH2.class, NoOracle.class, NoMSSQL.class, NoSQLite.class, NoFirebird.class, NoMySQL.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoH2.class, NoOracle.class, NoMSSQL.class, NoMySQL.class, NoEclipselink.class }) public void testSingleTableReturningInCTESelectNew() { transactional(new TxVoidWork() { @Override diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/DeleteTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/DeleteTest.java index ab6e6e709e..af256fb99d 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/DeleteTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/DeleteTest.java @@ -5,10 +5,6 @@ package com.blazebit.persistence.testsuite; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; - import java.util.ArrayList; import java.util.Arrays; import java.util.HashSet; @@ -16,31 +12,29 @@ import java.util.Set; import java.util.TreeSet; -import javax.persistence.EntityManager; - -import com.blazebit.persistence.ReturningObjectBuilder; -import com.blazebit.persistence.SimpleReturningBuilder; -import com.blazebit.persistence.testsuite.base.jpa.category.NoMySQLOld; import org.junit.Before; import org.junit.Test; import org.junit.experimental.categories.Category; import com.blazebit.persistence.CriteriaBuilder; import com.blazebit.persistence.DeleteCriteriaBuilder; +import com.blazebit.persistence.ReturningObjectBuilder; import com.blazebit.persistence.ReturningResult; -import com.blazebit.persistence.testsuite.base.jpa.category.NoDatanucleus; +import com.blazebit.persistence.SimpleReturningBuilder; import com.blazebit.persistence.testsuite.base.jpa.category.NoEclipselink; -import com.blazebit.persistence.testsuite.base.jpa.category.NoFirebird; import com.blazebit.persistence.testsuite.base.jpa.category.NoH2; +import com.blazebit.persistence.testsuite.base.jpa.category.NoMSSQL; import com.blazebit.persistence.testsuite.base.jpa.category.NoMySQL; -import com.blazebit.persistence.testsuite.base.jpa.category.NoOpenJPA; import com.blazebit.persistence.testsuite.base.jpa.category.NoOracle; -import com.blazebit.persistence.testsuite.base.jpa.category.NoSQLite; -import com.blazebit.persistence.testsuite.base.jpa.category.NoMSSQL; import com.blazebit.persistence.testsuite.entity.Document; import com.blazebit.persistence.testsuite.entity.IdHolderCTE; import com.blazebit.persistence.testsuite.entity.Person; import com.blazebit.persistence.testsuite.tx.TxVoidWork; +import jakarta.persistence.EntityManager; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; /** * @@ -171,7 +165,7 @@ public void work(EntityManager em) { // NOTE: H2 and MySQL only support returning generated keys @Test - @Category({ NoH2.class, NoMySQL.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoH2.class, NoMySQL.class, NoEclipselink.class }) public void testReturningAll() { transactional(new TxVoidWork() { @Override @@ -194,7 +188,7 @@ public void work(EntityManager em) { // NOTE: H2 and MySQL only support returning generated keys @Test - @Category({ NoH2.class, NoMySQL.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoH2.class, NoMySQL.class, NoEclipselink.class }) public void testReturningAllObjectBuilder() { transactional(new TxVoidWork() { @Override @@ -232,7 +226,7 @@ public List buildList(List list) { // NOTE: H2 and MySQL only support returning generated keys @Test - @Category({ NoH2.class, NoMySQL.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoH2.class, NoMySQL.class, NoEclipselink.class }) public void testReturningLast() { transactional(new TxVoidWork() { @Override @@ -254,7 +248,7 @@ public void work(EntityManager em) { // NOTE: H2 only supports with clause in select statement // NOTE: MySQL does not support CTEs @Test - @Category({ NoH2.class, NoMySQL.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoH2.class, NoMySQL.class, NoEclipselink.class }) public void testReturningLastWithCte() { transactional(new TxVoidWork() { @Override @@ -286,9 +280,8 @@ public void work(EntityManager em) { } // NOTE: H2 only supports with clause in select statement - // NOTE: MySQL does not support CTEs @Test - @Category({ NoH2.class, NoMySQLOld.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoH2.class, NoEclipselink.class }) public void testSimpleWithCte() { transactional(new TxVoidWork() { @Override @@ -318,7 +311,7 @@ public void work(EntityManager em) { // NOTE: Currently only PostgreSQL and DB2 support returning from within a CTE @Test - @Category({ NoH2.class, NoOracle.class, NoMSSQL.class, NoSQLite.class, NoFirebird.class, NoMySQL.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoH2.class, NoOracle.class, NoMSSQL.class, NoMySQL.class, NoEclipselink.class }) public void testDeleteReturningSelectOld() { transactional(new TxVoidWork() { @Override @@ -352,7 +345,7 @@ public void work(EntityManager em) { // NOTE: Currently only PostgreSQL and DB2 support returning from within a CTE @Test - @Category({ NoH2.class, NoOracle.class, NoMSSQL.class, NoSQLite.class, NoFirebird.class, NoMySQL.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoH2.class, NoOracle.class, NoMSSQL.class, NoMySQL.class, NoEclipselink.class }) public void testDeleteReturningSelectNew() { transactional(new TxVoidWork() { @Override diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/ElementCollectionTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/ElementCollectionTest.java index c5c0653357..4e032b2b86 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/ElementCollectionTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/ElementCollectionTest.java @@ -9,7 +9,7 @@ import java.util.Locale; -import javax.persistence.Tuple; +import jakarta.persistence.Tuple; import com.blazebit.persistence.testsuite.base.jpa.category.NoEclipselink; import org.junit.Test; diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/EmbeddableComplexTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/EmbeddableComplexTest.java index ceb1a1ea0b..443bf79618 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/EmbeddableComplexTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/EmbeddableComplexTest.java @@ -7,15 +7,10 @@ import static org.junit.Assert.assertEquals; -import javax.persistence.Tuple; - -import com.blazebit.persistence.testsuite.base.jpa.category.NoDatanucleus; import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate42; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate43; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate50; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate51; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate60; +import jakarta.persistence.Tuple; + +import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate62; import com.blazebit.persistence.testsuite.entity.*; import org.junit.Assert; import org.junit.Test; @@ -23,7 +18,6 @@ import com.blazebit.persistence.CriteriaBuilder; import com.blazebit.persistence.testsuite.base.jpa.category.NoEclipselink; -import com.blazebit.persistence.testsuite.base.jpa.category.NoOpenJPA; /** * This kind of mapping is not required to be supported by a JPA implementation. @@ -32,8 +26,7 @@ * @since 1.0.6 */ // NOTE: EclipseLink doesn't support Map in embeddables: https://bugs.eclipse.org/bugs/show_bug.cgi?id=391062 -// TODO: report that datanucleus doesn't support element collection in an embeddable -@Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) +@Category({NoEclipselink.class}) public class EmbeddableComplexTest extends AbstractCoreTest { @Override @@ -124,8 +117,6 @@ public void testWhereEmbeddableElementCollectionPropertyFilter() { } @Test - // NOTE: http://hibernate.atlassian.net/browse/HHH-10229 - @Category({ NoHibernate42.class, NoHibernate43.class, NoHibernate50.class, NoHibernate51.class }) public void testSelectEmbeddableElementCollection() { CriteriaBuilder cb = cbf.create(em, Tuple.class).from(EmbeddableTestEntity.class, "e") .select("embeddable.elementCollection"); @@ -136,8 +127,6 @@ public void testSelectEmbeddableElementCollection() { } @Test - // NOTE: http://hibernate.atlassian.net/browse/HHH-10229 - @Category({ NoHibernate42.class, NoHibernate43.class, NoHibernate50.class, NoHibernate51.class }) public void testSelectEmbeddableElementCollectionArraySyntax() { CriteriaBuilder cb = cbf.create(em, Tuple.class).from(EmbeddableTestEntity.class, "e") .select("embeddable.elementCollection['test']"); @@ -148,8 +137,6 @@ public void testSelectEmbeddableElementCollectionArraySyntax() { } @Test - // NOTE: http://hibernate.atlassian.net/browse/HHH-10229 - @Category({ NoHibernate42.class, NoHibernate43.class, NoHibernate50.class, NoHibernate51.class }) public void testSelectEmbeddableElementCollectionArraySyntaxValue() { CriteriaBuilder cb = cbf.create(em, Tuple.class).from(EmbeddableTestEntity.class, "e") .select("embeddable.elementCollection['test'].primaryName"); @@ -177,7 +164,7 @@ public void testSelectEmbeddableFetchElementCollection() { @Test // Test for #598 // NOTE: Hibernate 6.0 supports this now - @Category(NoHibernate60.class) + @Category(NoHibernate.class) public void testSelectEmbeddableFetchElementCollectionJpaOnly() { try { em.createQuery("SELECT e.embeddable FROM EmbeddableTestEntity e JOIN FETCH e.embeddable.elementCollection2").getResultList(); diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/EmbeddableSimpleTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/EmbeddableSimpleTest.java index 203b766662..9b2c0336b3 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/EmbeddableSimpleTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/EmbeddableSimpleTest.java @@ -5,23 +5,17 @@ package com.blazebit.persistence.testsuite; +import org.junit.Test; +import org.junit.experimental.categories.Category; + import com.blazebit.persistence.CriteriaBuilder; import com.blazebit.persistence.PaginatedCriteriaBuilder; -import com.blazebit.persistence.testsuite.base.jpa.category.NoDatanucleus; -import com.blazebit.persistence.testsuite.base.jpa.category.NoDatanucleus4; import com.blazebit.persistence.testsuite.base.jpa.category.NoEclipselink; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate42; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate43; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate50; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate51; import com.blazebit.persistence.testsuite.entity.Order; import com.blazebit.persistence.testsuite.entity.OrderPosition; import com.blazebit.persistence.testsuite.entity.OrderPositionElement; import com.blazebit.persistence.testsuite.entity.OrderPositionHead; -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import javax.persistence.Tuple; +import jakarta.persistence.Tuple; import static org.junit.Assert.assertEquals; @@ -86,8 +80,6 @@ public void testCyclicDependencyInOnClauseImplicitJoin() { } @Test - // Prior to Hibernate 5.1 it wasn't possible reference other from clause elements in the ON clause which is required to support implicit joins in ON clauses - @Category({ NoHibernate42.class, NoHibernate43.class, NoHibernate50.class }) public void testCyclicDependencyInOnClauseImplicitJoin2() { CriteriaBuilder criteria = cbf.create(em, OrderPosition.class, "p"); criteria.leftJoinDefaultOn("p.order", "o") @@ -97,8 +89,7 @@ public void testCyclicDependencyInOnClauseImplicitJoin2() { } @Test - // Prior to Hibernate 5.1 it wasn't possible reference other from clause elements in the ON clause which is required to support implicit joins in ON clauses - @Category({ NoHibernate42.class, NoHibernate43.class, NoHibernate50.class, NoEclipselink.class }) + @Category({ NoEclipselink.class }) public void testCyclicDependencyInOnClauseImplicitJoin3() { CriteriaBuilder criteria = cbf.create(em, OrderPosition.class, "p"); criteria.leftJoinDefaultOn("p.order", "o") @@ -108,9 +99,7 @@ public void testCyclicDependencyInOnClauseImplicitJoin3() { } @Test - // Prior to Hibernate 5.1 it wasn't possible reference other from clause elements in the ON clause which is required to support implicit joins in ON clauses - // NOTE: DataNucleus 4 does not seem to support TYPE(x) IN (..) - @Category({ NoHibernate42.class, NoHibernate43.class, NoHibernate50.class, NoEclipselink.class, NoDatanucleus4.class }) + @Category({ NoEclipselink.class }) public void testCyclicDependencyInOnClauseImplicitJoin4() { CriteriaBuilder criteria = cbf.create(em, OrderPosition.class, "p"); criteria.leftJoinDefaultOn("p.order", "o") @@ -120,8 +109,6 @@ public void testCyclicDependencyInOnClauseImplicitJoin4() { } @Test - // Prior to Hibernate 5.1 it wasn't possible reference other from clause elements in the ON clause which is required to support implicit joins in ON clauses - @Category({ NoHibernate42.class, NoHibernate43.class, NoHibernate50.class }) public void testCyclicDependencyInOnClauseImplicitJoin5() { CriteriaBuilder criteria = cbf.create(em, Order.class, "o"); criteria.leftJoinDefaultOn("o.orderPositions", "p") @@ -131,8 +118,6 @@ public void testCyclicDependencyInOnClauseImplicitJoin5() { } @Test - // Prior to Hibernate 5.1 it wasn't possible reference other from clause elements in the ON clause which is required to support implicit joins in ON clauses - @Category({ NoHibernate42.class, NoHibernate43.class, NoHibernate50.class }) public void testCyclicDependencyInOnClauseImplicitJoin6() { CriteriaBuilder criteria = cbf.create(em, Order.class, "o"); criteria.leftJoinDefaultOn("o.orderPositions", "p") @@ -142,8 +127,6 @@ public void testCyclicDependencyInOnClauseImplicitJoin6() { } @Test - // Prior to Hibernate 5.1 it wasn't possible reference other from clause elements in the ON clause which is required to support implicit joins in ON clauses - @Category({ NoHibernate42.class, NoHibernate43.class, NoHibernate50.class, NoDatanucleus4.class }) public void testCyclicDependencyInOnClauseImplicitJoin7() { CriteriaBuilder criteria = cbf.create(em, Order.class, "o"); criteria.leftJoinDefault("o.orderPositions", "p") @@ -160,8 +143,6 @@ public void testCyclicDependencyInOnClauseImplicitJoin7() { } @Test - // Prior to Hibernate 5.1 it wasn't possible reference other from clause elements in the ON clause which is required to support implicit joins in ON clauses - @Category({ NoHibernate42.class, NoHibernate43.class, NoHibernate50.class, NoDatanucleus4.class }) public void testCyclicDependencyInOnClauseImplicitJoin8() { CriteriaBuilder criteria = cbf.create(em, Order.class, "o"); criteria.leftJoinDefault("o.orderPositions", "p") @@ -179,8 +160,6 @@ public void testCyclicDependencyInOnClauseImplicitJoin8() { } @Test - // Prior to Hibernate 5.1 it wasn't possible reference other from clause elements in the ON clause which is required to support implicit joins in ON clauses - @Category({ NoHibernate42.class, NoHibernate43.class, NoHibernate50.class, NoDatanucleus4.class }) public void testCyclicDependencyInOnClauseImplicitJoin9() { CriteriaBuilder criteria = cbf.create(em, Order.class, "o"); criteria.leftJoinDefault("o.orderPositions", "p") @@ -199,8 +178,6 @@ public void testCyclicDependencyInOnClauseImplicitJoin9() { } @Test - // Prior to Hibernate 5.1 it wasn't possible reference other from clause elements in the ON clause which is required to support implicit joins in ON clauses - @Category({ NoHibernate42.class, NoHibernate43.class, NoHibernate50.class, NoDatanucleus4.class }) public void testCyclicDependencyInOnClauseImplicitJoin10() { CriteriaBuilder criteria = cbf.create(em, Order.class, "o"); criteria.leftJoinDefaultOn("o.orderPositions", "p") @@ -220,8 +197,6 @@ public void testCyclicDependencyInOnClauseImplicitJoin10() { } @Test - // Prior to Hibernate 5.1 it wasn't possible reference other from clause elements in the ON clause which is required to support implicit joins in ON clauses - @Category({ NoHibernate42.class, NoHibernate43.class, NoHibernate50.class, NoDatanucleus4.class }) public void testCyclicDependencyInOnClauseImplicitJoin11() { CriteriaBuilder criteria = cbf.create(em, Order.class, "o"); criteria.leftJoinDefaultOn("o.orderPositions", "p") @@ -242,8 +217,6 @@ public void testCyclicDependencyInOnClauseImplicitJoin11() { } @Test - // Prior to Hibernate 5.1 it wasn't possible reference other from clause elements in the ON clause which is required to support implicit joins in ON clauses - @Category({ NoHibernate42.class, NoHibernate43.class, NoHibernate50.class, NoDatanucleus4.class }) public void testCyclicDependencyInOnClauseImplicitJoinInDisjunction() { CriteriaBuilder criteria = cbf.create(em, Order.class, "o"); criteria.leftJoinDefaultOn("o.orderPositions", "p") @@ -266,8 +239,7 @@ public void testCyclicDependencyInOnClauseImplicitJoinInDisjunction() { } @Test - // Prior to Hibernate 5.1 it wasn't possible reference other from clause elements in the ON clause which is required to support implicit joins in ON clauses - @Category({ NoHibernate42.class, NoHibernate43.class, NoHibernate50.class, NoDatanucleus4.class, NoEclipselink.class }) + @Category({ NoEclipselink.class }) public void testCyclicDependencyInOnClauseImplicitJoinInDisjunction2() { CriteriaBuilder criteria = cbf.create(em, Order.class, "o"); criteria.leftJoinDefaultOn("o.orderPositions", "p") @@ -299,8 +271,7 @@ public void testCyclicDependencyInOnClauseImplicitJoinInDisjunction2() { } @Test - // Prior to Hibernate 5.1 it wasn't possible reference other from clause elements in the ON clause which is required to support implicit joins in ON clauses - @Category({ NoHibernate42.class, NoHibernate43.class, NoHibernate50.class, NoDatanucleus.class, NoEclipselink.class }) + @Category({ NoEclipselink.class }) public void testImplicitJoinSingularAttributeInOnClause() { CriteriaBuilder criteria = cbf.create(em, Order.class, "o"); criteria.leftJoinDefault("o.orderPositions", "p") @@ -337,8 +308,7 @@ public void testImplicitJoinSingularAttributeInOnClause() { // } @Test - // Prior to Hibernate 5.1 it wasn't possible reference other from clause elements in the ON clause which is required to support implicit joins in ON clauses - @Category({ NoHibernate42.class, NoHibernate43.class, NoHibernate50.class, NoDatanucleus.class, NoEclipselink.class }) + @Category({ NoEclipselink.class }) public void testSingleValueAssociationIdAccessInOnClause() { CriteriaBuilder criteria = cbf.create(em, Order.class, "o"); criteria.leftJoinDefault("o.orderPositions", "p") diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/EntityEqualityGeneralTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/EntityEqualityGeneralTest.java index 0ab80e1772..c4ca9d3f3d 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/EntityEqualityGeneralTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/EntityEqualityGeneralTest.java @@ -6,7 +6,6 @@ package com.blazebit.persistence.testsuite; import com.blazebit.persistence.CriteriaBuilder; -import com.blazebit.persistence.testsuite.base.jpa.category.NoDatanucleus; import com.blazebit.persistence.testsuite.base.jpa.category.NoEclipselink; import com.blazebit.persistence.testsuite.entity.Document; import com.blazebit.persistence.testsuite.entity.Person; @@ -32,8 +31,6 @@ public void neverRewriteEntityAssociationEqualsEntityInWhere() { } @Test - // NOTE: Datanucleus does not support transient objects as parameters - @Category({ NoDatanucleus.class }) public void neverRewriteEntityAssociationEqualsTransientEntityParameterInWhere() { CriteriaBuilder criteria = cbf.create(em, Document.class, "d"); criteria.where("d.owner").eq(new Person(1L)); diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/EntityEqualityNoRewriteToIdTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/EntityEqualityNoRewriteToIdTest.java index 5dd72e5781..98daaaf046 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/EntityEqualityNoRewriteToIdTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/EntityEqualityNoRewriteToIdTest.java @@ -5,18 +5,13 @@ package com.blazebit.persistence.testsuite; +import org.junit.Test; +import org.junit.experimental.categories.Category; + import com.blazebit.persistence.CriteriaBuilder; -import com.blazebit.persistence.testsuite.base.jpa.category.NoDatanucleus; -import com.blazebit.persistence.testsuite.base.jpa.category.NoDatanucleus4; import com.blazebit.persistence.testsuite.base.jpa.category.NoEclipselink; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate42; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate43; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate50; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate51; import com.blazebit.persistence.testsuite.entity.Document; import com.blazebit.persistence.testsuite.entity.Person; -import org.junit.Test; -import org.junit.experimental.categories.Category; import static org.junit.Assert.assertEquals; @@ -26,7 +21,6 @@ * @author Christian Beikov * @since 1.2.0 */ -@Category({ NoHibernate42.class, NoHibernate43.class, NoHibernate50.class, NoHibernate51.class }) public class EntityEqualityNoRewriteToIdTest extends AbstractCoreTest { @Test @@ -42,7 +36,6 @@ public void neverRewriteEntityAssociationEqualsEntityInOnIfSupported() { } @Test - @Category({ NoHibernate42.class, NoHibernate43.class, NoHibernate50.class, NoHibernate51.class, NoDatanucleus4.class }) public void neverRewriteEntityAssociationEqualsEntityInOnIfSupported1() { CriteriaBuilder criteria = cbf.create(em, Person.class, "p"); criteria.innerJoinOn(Document.class,"correlated_ownedDocuments") @@ -56,7 +49,6 @@ public void neverRewriteEntityAssociationEqualsEntityInOnIfSupported1() { } @Test - @Category({ NoHibernate42.class, NoHibernate43.class, NoHibernate50.class, NoHibernate51.class, NoDatanucleus4.class }) public void neverRewriteEntityAssociationEqualsEntityInOnIfSupported2() { CriteriaBuilder criteria = cbf.create(em, Person.class, "p"); criteria.select("correlated_ownedDocuments.owner.name"); @@ -71,8 +63,6 @@ public void neverRewriteEntityAssociationEqualsEntityInOnIfSupported2() { } @Test - // NOTE: Datanucleus does not support transient objects as parameters - @Category({ NoHibernate42.class, NoHibernate43.class, NoHibernate50.class, NoHibernate51.class, NoDatanucleus.class }) public void neverRewriteEntityAssociationEqualsTransientEntityParameterInOnIfSupported() { CriteriaBuilder criteria = cbf.create(em, Document.class, "d"); criteria.innerJoinOn("partners","p") @@ -86,7 +76,7 @@ public void neverRewriteEntityAssociationEqualsTransientEntityParameterInOnIfSup @Test // NOTE: Eclipselink loads entities when doing getReference() - @Category({ NoHibernate42.class, NoHibernate43.class, NoHibernate50.class, NoHibernate51.class, NoEclipselink.class }) + @Category({ NoEclipselink.class }) public void neverRewriteEntityAssociationEqualsManagedEntityParameterInOnIfSupported() { CriteriaBuilder criteria = cbf.create(em, Document.class, "d"); criteria.innerJoinOn("partners","p") @@ -111,8 +101,6 @@ public void neverRewriteEntityEqualsEntityAssociationInOnIfSupported() { } @Test - // NOTE: Datanucleus does not support transient objects as parameters - @Category({ NoHibernate42.class, NoHibernate43.class, NoHibernate50.class, NoHibernate51.class, NoDatanucleus.class }) public void neverRewriteEntityEqualsTransientEntityParameterInOn() { CriteriaBuilder criteria = cbf.create(em, Document.class, "d"); criteria.innerJoinOn("partners","p") @@ -126,7 +114,7 @@ public void neverRewriteEntityEqualsTransientEntityParameterInOn() { @Test // NOTE: Eclipselink loads entities when doing getReference() - @Category({ NoHibernate42.class, NoHibernate43.class, NoHibernate50.class, NoHibernate51.class, NoEclipselink.class }) + @Category({ NoEclipselink.class }) public void neverRewriteEntityEqualsManagedEntityParameterInOn() { CriteriaBuilder criteria = cbf.create(em, Document.class, "d"); criteria.innerJoinOn("partners","p") diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/EntityEqualityRewriteToIdTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/EntityEqualityRewriteToIdTest.java deleted file mode 100644 index c5287b6167..0000000000 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/EntityEqualityRewriteToIdTest.java +++ /dev/null @@ -1,134 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Blazebit - */ - -package com.blazebit.persistence.testsuite; - -import com.blazebit.persistence.CriteriaBuilder; -import com.blazebit.persistence.testsuite.base.jpa.category.NoDatanucleus; -import com.blazebit.persistence.testsuite.base.jpa.category.NoEclipselink; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate42; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate43; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate50; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate51; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate52; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate53; -import com.blazebit.persistence.testsuite.base.jpa.category.NoOpenJPA; -import com.blazebit.persistence.testsuite.entity.Document; -import com.blazebit.persistence.testsuite.entity.Person; -import org.junit.Assume; -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import static org.junit.Assert.assertEquals; - -/** - * Test that asserts Hibernate versions which can't handle entity comparisons do id rewrites. - * - * @author Christian Beikov - * @since 1.2.0 - */ -@Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) -public class EntityEqualityRewriteToIdTest extends AbstractCoreTest { - - @Test - // This actually only makes sense for Hibernate 5.1 - public void rewriteEntityAssociationEqualsEntityInOnToIdEquals() { - Assume.assumeTrue(getJpaProviderFamily() == JpaProviderFamily.HIBERNATE && getJpaProviderMajorVersion() == 5 && getJpaProviderMinorVersion() == 1); - CriteriaBuilder criteria = cbf.create(em, Document.class, "d"); - criteria.innerJoinOn("partners","p") - .on("p.partnerDocument").eqExpression("d") - .end(); - - assertEquals("SELECT d FROM Document d JOIN d.partners p" - + onClause("p.partnerDocument.id = d.id"), criteria.getQueryString()); - criteria.getResultList(); - } - - @Test - // Pre Hibernate 5.1 we could do this broken thing to make some stuff work - public void rewriteEntityAssociationEqualsEntityInOnToIdEqualsBroken() { - Assume.assumeTrue(getJpaProviderFamily() == JpaProviderFamily.HIBERNATE && getJpaProviderMajorVersion() < 5 || getJpaProviderMajorVersion() == 5 && getJpaProviderMinorVersion() == 0); - CriteriaBuilder criteria = cbf.create(em, Document.class, "d"); - criteria.innerJoinOn("partners","p") - .on("p.partnerDocument").eqExpression("d") - .end(); - - assertEquals("SELECT d FROM Document d JOIN d.partners p" - + onClause("p.partnerDocument.id = d"), criteria.getQueryString()); - criteria.getResultList(); - } - - @Test - // Pre Hibernate 5.1 we could do this broken thing to make some stuff work - public void rewriteEntityAssociationEqualsParameterInOnToIdEquals() { - Assume.assumeTrue(getJpaProviderFamily() == JpaProviderFamily.HIBERNATE && getJpaProviderMajorVersion() < 5 || getJpaProviderMajorVersion() == 5 && getJpaProviderMinorVersion() <= 1); - CriteriaBuilder criteria = cbf.create(em, Document.class, "d"); - criteria.innerJoinOn("partners","p") - .on("p.partnerDocument").eq(new Document(1L)) - .end(); - - assertEquals("SELECT d FROM Document d JOIN d.partners p" - + onClause("p.partnerDocument.id = :param_0"), criteria.getQueryString()); - criteria.getResultList(); - } - - @Test - // This actually only makes sense for Hibernate 5.1 - public void rewriteEntityEqualsEntityAssociationInOnToIdEquals() { - Assume.assumeTrue(getJpaProviderFamily() == JpaProviderFamily.HIBERNATE && getJpaProviderMajorVersion() == 5 && getJpaProviderMinorVersion() == 1); - CriteriaBuilder criteria = cbf.create(em, Document.class, "d"); - criteria.innerJoinOn("partners","p") - .on("p").eqExpression("d.owner") - .end(); - - assertEquals("SELECT d FROM Document d JOIN d.partners p" - + onClause("p.id = d.owner.id"), criteria.getQueryString()); - criteria.getResultList(); - } - - @Test - // Pre Hibernate 5.1 we could do this broken thing to make some stuff work - public void rewriteEntityEqualsEntityAssociationInOnToIdEqualsBroken() { - Assume.assumeTrue(getJpaProviderFamily() == JpaProviderFamily.HIBERNATE && getJpaProviderMajorVersion() < 5 || getJpaProviderMajorVersion() == 5 && getJpaProviderMinorVersion() == 0); - CriteriaBuilder criteria = cbf.create(em, Document.class, "d"); - criteria.innerJoinOn("partners","p") - .on("p").eqExpression("d.owner") - .end(); - - assertEquals("SELECT d FROM Document d JOIN d.partners p" - + onClause("p = d.owner.id"), criteria.getQueryString()); - criteria.getResultList(); - } - - @Test - // This actually only makes sense for Hibernate 5.1 - @Category({ NoHibernate42.class, NoHibernate43.class, NoHibernate50.class, NoHibernate52.class, NoHibernate53.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) - public void rewriteEntityEqualsTransientEntityParameterInOn() { - Assume.assumeTrue(getJpaProviderFamily() == JpaProviderFamily.HIBERNATE && getJpaProviderMajorVersion() == 5 && getJpaProviderMinorVersion() == 1); - CriteriaBuilder criteria = cbf.create(em, Document.class, "d"); - criteria.innerJoinOn("partners","p") - .on("p").eq(new Person(1L)) - .end(); - - assertEquals("SELECT d FROM Document d JOIN d.partners p" - + onClause("p.id = :param_0"), criteria.getQueryString()); - criteria.getResultList(); - } - - @Test - // Pre Hibernate 5.1 we could do this broken thing to make some stuff work - public void rewriteEntityEqualsTransientEntityParameterInOnBroken() { - Assume.assumeTrue(getJpaProviderFamily() == JpaProviderFamily.HIBERNATE && getJpaProviderMajorVersion() < 5 || getJpaProviderMajorVersion() == 5 && getJpaProviderMinorVersion() == 0); - CriteriaBuilder criteria = cbf.create(em, Document.class, "d"); - criteria.innerJoinOn("partners","p") - .on("p").eq(new Person(1L)) - .end(); - - assertEquals("SELECT d FROM Document d JOIN d.partners p" - + onClause("p = :param_0"), criteria.getQueryString()); - criteria.getResultList(); - } - -} diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/EntityInValuesClauseTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/EntityInValuesClauseTest.java index f7c06ac00f..5bada47193 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/EntityInValuesClauseTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/EntityInValuesClauseTest.java @@ -5,24 +5,23 @@ package com.blazebit.persistence.testsuite; +import java.util.Arrays; +import java.util.List; + +import org.junit.Before; +import org.junit.Test; +import org.junit.experimental.categories.Category; + import com.blazebit.persistence.CriteriaBuilder; -import com.blazebit.persistence.testsuite.base.jpa.category.NoDatanucleus; import com.blazebit.persistence.testsuite.base.jpa.category.NoEclipselink; -import com.blazebit.persistence.testsuite.base.jpa.category.NoOpenJPA; import com.blazebit.persistence.testsuite.entity.Document; import com.blazebit.persistence.testsuite.entity.DocumentTupleEntity; import com.blazebit.persistence.testsuite.entity.EmbeddedDocumentTupleEntity; import com.blazebit.persistence.testsuite.entity.Person; import com.blazebit.persistence.testsuite.tx.TxVoidWork; -import org.junit.Before; -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import javax.persistence.EntityManager; -import javax.persistence.Tuple; -import javax.persistence.TypedQuery; -import java.util.Arrays; -import java.util.List; +import jakarta.persistence.EntityManager; +import jakarta.persistence.Tuple; +import jakarta.persistence.TypedQuery; import static org.junit.Assert.assertEquals; @@ -75,7 +74,7 @@ public void setUp() { } @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoEclipselink.class }) public void entityClassWithMultipleRelationsInValuesClause() { CriteriaBuilder cb = cbf.create(em, Tuple.class); @@ -96,7 +95,7 @@ public void entityClassWithMultipleRelationsInValuesClause() { } @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoEclipselink.class }) public void entityClassWithEmbeddedIdInValuesClause() { CriteriaBuilder cb = cbf.create(em, Tuple.class); diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/EntityJoinTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/EntityJoinTest.java index cc3d2697f1..2e381e80c0 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/EntityJoinTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/EntityJoinTest.java @@ -5,21 +5,16 @@ package com.blazebit.persistence.testsuite; +import java.util.List; + +import org.junit.Test; + import com.blazebit.persistence.CriteriaBuilder; -import com.blazebit.persistence.testsuite.base.jpa.category.NoDatanucleus4; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate42; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate43; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate50; -import com.blazebit.persistence.testsuite.base.jpa.category.NoOpenJPA; import com.blazebit.persistence.testsuite.entity.Document; import com.blazebit.persistence.testsuite.entity.Person; import com.blazebit.persistence.testsuite.tx.TxVoidWork; -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import javax.persistence.EntityManager; -import javax.persistence.Tuple; -import java.util.List; +import jakarta.persistence.EntityManager; +import jakarta.persistence.Tuple; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; @@ -29,8 +24,6 @@ * @author Christian Beikov * @since 1.2.0 */ -// NOTE: Entity joins are supported since Hibernate 5.1, Datanucleus 5 and latest Eclipselink -@Category({ NoHibernate42.class, NoHibernate43.class, NoHibernate50.class, NoDatanucleus4.class, NoOpenJPA.class}) public class EntityJoinTest extends AbstractCoreTest { @Override diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/EntitySchemaInTableAnnotationTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/EntitySchemaInTableAnnotationTest.java index b4b4a6e843..e32c569998 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/EntitySchemaInTableAnnotationTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/EntitySchemaInTableAnnotationTest.java @@ -9,7 +9,7 @@ import com.blazebit.persistence.testsuite.entity.SchemaEntity; import org.junit.Test; -import javax.persistence.EntityManagerFactory; +import jakarta.persistence.EntityManagerFactory; import java.sql.Connection; import java.util.Properties; diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/EnumTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/EnumTest.java index 529fe315d8..fd6b0e1d97 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/EnumTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/EnumTest.java @@ -9,8 +9,8 @@ import java.util.List; -import javax.persistence.EntityManager; -import javax.persistence.EntityTransaction; +import jakarta.persistence.EntityManager; +import jakarta.persistence.EntityTransaction; import com.blazebit.persistence.testsuite.tx.TxVoidWork; import org.junit.Before; diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/FunctionTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/FunctionTest.java index 28869c3caa..d2a5f29a94 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/FunctionTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/FunctionTest.java @@ -7,7 +7,7 @@ import static org.junit.Assert.assertEquals; -import javax.persistence.Tuple; +import jakarta.persistence.Tuple; import org.junit.Test; diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/GroupByEmbeddableTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/GroupByEmbeddableTest.java index 2771dec449..cac794526c 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/GroupByEmbeddableTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/GroupByEmbeddableTest.java @@ -6,31 +6,11 @@ package com.blazebit.persistence.testsuite; import com.blazebit.persistence.CriteriaBuilder; -import com.blazebit.persistence.testsuite.base.jpa.category.NoDB2; -import com.blazebit.persistence.testsuite.base.jpa.category.NoDatanucleus; -import com.blazebit.persistence.testsuite.base.jpa.category.NoDatanucleus4; -import com.blazebit.persistence.testsuite.base.jpa.category.NoEclipselink; -import com.blazebit.persistence.testsuite.base.jpa.category.NoFirebird; -import com.blazebit.persistence.testsuite.base.jpa.category.NoH2; -import com.blazebit.persistence.testsuite.base.jpa.category.NoMSSQL; -import com.blazebit.persistence.testsuite.base.jpa.category.NoOracle; -import com.blazebit.persistence.testsuite.base.jpa.category.NoPostgreSQL; -import com.blazebit.persistence.testsuite.base.jpa.category.NoSQLite; -import com.blazebit.persistence.testsuite.entity.Document; -import com.blazebit.persistence.testsuite.entity.IntIdEntity; -import com.blazebit.persistence.testsuite.entity.Order; -import com.blazebit.persistence.testsuite.entity.OrderPosition; -import com.blazebit.persistence.testsuite.entity.OrderPositionElement; -import com.blazebit.persistence.testsuite.entity.OrderPositionHead; -import com.blazebit.persistence.testsuite.entity.Person; import com.blazebit.persistence.testsuite.entity.SimpleEmbeddedIdEntity; import com.blazebit.persistence.testsuite.entity.SimpleEmbeddedIdEntityId; -import com.blazebit.persistence.testsuite.entity.Version; -import com.blazebit.persistence.testsuite.entity.Workflow; import org.junit.Test; -import org.junit.experimental.categories.Category; -import javax.persistence.Tuple; +import jakarta.persistence.Tuple; import static org.junit.Assert.assertEquals; diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/GroupByTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/GroupByTest.java index 170c7bbed2..e2566bf214 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/GroupByTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/GroupByTest.java @@ -5,23 +5,21 @@ package com.blazebit.persistence.testsuite; +import org.junit.Test; +import org.junit.experimental.categories.Category; + import com.blazebit.persistence.CriteriaBuilder; import com.blazebit.persistence.testsuite.base.jpa.category.NoDB2; -import com.blazebit.persistence.testsuite.base.jpa.category.NoDatanucleus; -import com.blazebit.persistence.testsuite.base.jpa.category.NoDatanucleus4; import com.blazebit.persistence.testsuite.base.jpa.category.NoEclipselink; -import com.blazebit.persistence.testsuite.base.jpa.category.NoFirebird; import com.blazebit.persistence.testsuite.base.jpa.category.NoH2; +import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate; +import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate62; import com.blazebit.persistence.testsuite.base.jpa.category.NoMSSQL; import com.blazebit.persistence.testsuite.base.jpa.category.NoOracle; import com.blazebit.persistence.testsuite.base.jpa.category.NoPostgreSQL; -import com.blazebit.persistence.testsuite.base.jpa.category.NoSQLite; import com.blazebit.persistence.testsuite.entity.Document; import com.blazebit.persistence.testsuite.entity.Person; -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import javax.persistence.Tuple; +import jakarta.persistence.Tuple; import static org.junit.Assert.assertEquals; @@ -32,9 +30,7 @@ */ public class GroupByTest extends AbstractCoreTest { - // Datanucleus does not support grouping by a byte[] as it seems @Test - @Category({ NoDatanucleus.class }) public void testGroupByEntitySelect() { CriteriaBuilder criteria = cbf.create(em, Long.class).from(Document.class, "d"); criteria.groupBy("d.owner"); @@ -62,7 +58,7 @@ public void testSizeTransformWithImplicitParameterGroupBy1() { // This is a MySQL only test @Test - @Category({ NoPostgreSQL.class, NoDB2.class, NoOracle.class, NoSQLite.class, NoFirebird.class, NoH2.class, NoMSSQL.class, NoEclipselink.class}) + @Category({ NoPostgreSQL.class, NoDB2.class, NoOracle.class, NoH2.class, NoMSSQL.class, NoEclipselink.class}) public void testImplicitGroupByFunctionExpression() { CriteriaBuilder criteria = cbf.create(em, Long.class).from(Document.class, "d") .select("CAST_DATE(FUNCTION('date', '2000-01-01'))") @@ -96,7 +92,9 @@ public void testOmitGroupByLiteral() { cb.getResultList(); } + // NOTE: Hibernate ORM doesn't detect that it has to use the join alias column @Test + @Category({ NoHibernate.class }) public void testGroupBySubqueryCorrelatedExpression() { CriteriaBuilder cb = cbf.create(em, Tuple.class) .from(Document.class, "d") @@ -143,8 +141,6 @@ public void testGroupByElementCollectionKey() { } @Test - // DataNucleus4 apparently can't handle join of associations within element collections - @Category({ NoDatanucleus4.class }) public void testGroupByElementCollectionValue() { CriteriaBuilder cb = cbf.create(em, Long.class) .from(Document.class, "d") diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/GroupConcatTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/GroupConcatTest.java index 8a9cd49b98..a2c0c8de07 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/GroupConcatTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/GroupConcatTest.java @@ -7,8 +7,8 @@ import static org.junit.Assert.assertEquals; -import javax.persistence.EntityManager; -import javax.persistence.Tuple; +import jakarta.persistence.EntityManager; +import jakarta.persistence.Tuple; import com.blazebit.persistence.testsuite.base.jpa.category.NoOracle; import com.blazebit.persistence.testsuite.tx.TxVoidWork; diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/IdClassAttributePaginationTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/IdClassAttributePaginationTest.java index 64828b7f00..650413dbe5 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/IdClassAttributePaginationTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/IdClassAttributePaginationTest.java @@ -10,8 +10,8 @@ import com.blazebit.persistence.testsuite.tx.TxVoidWork; import org.junit.Test; -import javax.persistence.EntityManager; -import javax.persistence.Tuple; +import jakarta.persistence.EntityManager; +import jakarta.persistence.Tuple; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/IdClassValueQueryTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/IdClassValueQueryTest.java index 828b8d8d52..5f01c207bd 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/IdClassValueQueryTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/IdClassValueQueryTest.java @@ -5,19 +5,18 @@ package com.blazebit.persistence.testsuite; +import java.util.ArrayList; +import java.util.List; + +import org.junit.Test; +import org.junit.experimental.categories.Category; + import com.blazebit.persistence.CriteriaBuilder; -import com.blazebit.persistence.testsuite.base.jpa.category.NoDatanucleus; import com.blazebit.persistence.testsuite.base.jpa.category.NoEclipselink; -import com.blazebit.persistence.testsuite.base.jpa.category.NoOpenJPA; import com.blazebit.persistence.testsuite.entity.IdClassEntity; import com.blazebit.persistence.testsuite.tx.TxVoidWork; -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import javax.persistence.EntityManager; -import javax.persistence.TypedQuery; -import java.util.ArrayList; -import java.util.List; +import jakarta.persistence.EntityManager; +import jakarta.persistence.TypedQuery; import static org.junit.Assert.assertEquals; @@ -57,7 +56,7 @@ public void work(EntityManager em) { } @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoEclipselink.class }) public void testValueQuery() { IdClassEntity e1 = new IdClassEntity(1,"1", 1); IdClassEntity e2 = new IdClassEntity(2,"2", 2); diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/InTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/InTest.java index ef5c369c8b..da4448e194 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/InTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/InTest.java @@ -5,21 +5,18 @@ package com.blazebit.persistence.testsuite; -import static org.junit.Assert.assertEquals; - import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate42; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate43; import org.junit.Test; -import org.junit.experimental.categories.Category; import com.blazebit.persistence.CriteriaBuilder; import com.blazebit.persistence.testsuite.entity.Document; +import static org.junit.Assert.assertEquals; + /** * * @author Christian Beikov @@ -29,8 +26,6 @@ public class InTest extends AbstractCoreTest { @Test - // NOTE: See https://hibernate.atlassian.net/browse/HHH-9630 - @Category({ NoHibernate42.class, NoHibernate43.class }) public void testBuggyHqlIn() { CriteriaBuilder criteria = cbf.create(em, Document.class, "d"); List indicies = Arrays.asList(new Integer[]{ 1, 2, 3, 4, 5 }); @@ -46,8 +41,6 @@ public void testBuggyHqlIn() { } @Test - // NOTE: See https://hibernate.atlassian.net/browse/HHH-9630 - @Category({ NoHibernate42.class, NoHibernate43.class }) public void testBuggyHqlIn1() { CriteriaBuilder criteria = cbf.create(em, Document.class, "d"); List indicies = Arrays.asList(new Integer[]{ 1, 2, 3, 4, 5 }); diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/InlineCTETest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/InlineCTETest.java index db6909bc7e..fde2141390 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/InlineCTETest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/InlineCTETest.java @@ -5,18 +5,16 @@ package com.blazebit.persistence.testsuite; +import java.util.Collections; +import java.util.List; + +import org.junit.Assert; +import org.junit.Test; +import org.junit.experimental.categories.Category; + import com.blazebit.persistence.CriteriaBuilder; -import com.blazebit.persistence.testsuite.base.jpa.category.NoDatanucleus; import com.blazebit.persistence.testsuite.base.jpa.category.NoEclipselink; import com.blazebit.persistence.testsuite.base.jpa.category.NoH2; -import com.blazebit.persistence.testsuite.base.jpa.category.NoH2Latest; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate42; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate43; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate50; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate51; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate60; -import com.blazebit.persistence.testsuite.base.jpa.category.NoMySQLOld; -import com.blazebit.persistence.testsuite.base.jpa.category.NoOpenJPA; import com.blazebit.persistence.testsuite.base.jpa.category.NoOracle; import com.blazebit.persistence.testsuite.entity.Document; import com.blazebit.persistence.testsuite.entity.DocumentCTE; @@ -32,14 +30,7 @@ import com.blazebit.persistence.testsuite.entity.Version; import com.blazebit.persistence.testsuite.entity.Workflow; import com.blazebit.persistence.testsuite.tx.TxVoidWork; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import javax.persistence.EntityManager; -import java.util.Collections; -import java.util.List; +import jakarta.persistence.EntityManager; import static org.junit.Assert.assertEquals; @@ -101,11 +92,8 @@ public void work(EntityManager em) { }); } - // NOTE: Hibernate 4.2 and 4.3 interprets entity name tokens in string literals... - // Prior to Hibernate 5.1 it wasn't possible reference other from clause elements in the ON clause which is required to support implicit joins in ON clauses - // NOTE: H2 v2 issue: https://github.com/h2database/h2database/issues/3621 @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class, NoHibernate42.class, NoHibernate43.class, NoHibernate50.class, NoMySQLOld.class, NoH2Latest.class }) + @Category({ NoEclipselink.class }) public void testInliningFromSubqueryCte() { cbf.create(em, RecursiveEntity.class) .withRecursive(DocumentCTE.class) @@ -137,9 +125,8 @@ public void testInliningFromSubqueryCte() { } // TODO: Oracle requires a cycle clause #295 - // NOTE: H2 v2 issue: https://github.com/h2database/h2database/issues/3621 @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class, NoMySQLOld.class, NoOracle.class, NoH2Latest.class }) + @Category({ NoEclipselink.class, NoOracle.class }) public void testReusedNestedCte() { CriteriaBuilder cteBuilder = cbf.create(em, ParameterOrderEntity.class) .withRecursive(TestCTE.class) @@ -220,9 +207,8 @@ public void testReusedNestedCte() { } // TODO: Oracle requires a cycle clause #295 - // NOTE: H2 v2 issue: https://github.com/h2database/h2database/issues/3621 @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class, NoMySQLOld.class, NoOracle.class, NoH2Latest.class }) + @Category({ NoEclipselink.class, NoOracle.class }) public void testReusedNestedCte2() { CriteriaBuilder cteBuilder = cbf.create(em, ParameterOrderCte.class) .withRecursive(TestCTE.class) @@ -277,9 +263,8 @@ public void testReusedNestedCte2() { cteBuilder.getResultList(); } - // NOTE: Hibernate 4.2 and 4.3 interprets entity name tokens in string literals... @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class, NoHibernate42.class, NoHibernate43.class }) + @Category({ NoEclipselink.class }) public void testParameterBindingOrder() { CriteriaBuilder cteBuilder = cbf.create(em, ParameterOrderEntity.class) .with(ParameterOrderCte.class) @@ -305,9 +290,8 @@ public void testParameterBindingOrder() { Assert.assertEquals(1, resultList.size()); } - // NOTE: Hibernate 4.2 and 4.3 interprets entity name tokens in string literals... @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class, NoHibernate42.class, NoHibernate43.class }) + @Category({ NoEclipselink.class }) public void testParameterBindingOrderPaginated() { CriteriaBuilder cteBuilder = cbf.create(em, ParameterOrderEntity.class) .with(ParameterOrderCte.class) @@ -335,7 +319,7 @@ public void testParameterBindingOrderPaginated() { } @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoEclipselink.class }) public void testParameterBindingOrderNested() { CriteriaBuilder cteBuilder = cbf.create(em, ParameterOrderEntity.class) .with(ParameterOrderCte.class) @@ -366,9 +350,8 @@ public void testParameterBindingOrderNested() { Assert.assertEquals(1, resultList.size()); } - // NOTE: Hibernate 4.2 and 4.3 interprets entity name tokens in string literals... @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class, NoHibernate42.class, NoHibernate43.class }) + @Category({ NoEclipselink.class }) public void testParameterBindingOrderNestedPaginated() { CriteriaBuilder cteBuilder = cbf.create(em, ParameterOrderEntity.class) .with(ParameterOrderCte.class) @@ -404,7 +387,7 @@ public void testParameterBindingOrderNestedPaginated() { } @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoEclipselink.class }) public void testInlineCTE() { CriteriaBuilder cb = cbf.create(em, TestCTE.class, "t").where("t.level").ltExpression("2"); cb.with(TestCTE.class, true) @@ -425,7 +408,7 @@ public void testInlineCTE() { } @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoEclipselink.class }) public void testInlineCTENullExpression() { CriteriaBuilder cb = cbf.create(em, TestCTE.class, "t").where("t.level").ltExpression("2"); cb.with(TestCTE.class, true) @@ -445,7 +428,7 @@ public void testInlineCTENullExpression() { } @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoEclipselink.class }) public void testInlineCTEWithParam() { CriteriaBuilder cb = cbf.create(em, TestCTE.class, "t").where("t.level").ltExpression("2"); cb.with(TestCTE.class, true) @@ -464,9 +447,8 @@ public void testInlineCTEWithParam() { assertEquals(2, resultList.size()); } - // NOTE: Hibernate 4.2 and 4.3 interprets entity name tokens in string literals... @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class, NoHibernate42.class, NoHibernate43.class }) + @Category({ NoEclipselink.class }) public void testInlineCTEInCorrelatedSubquery() { CriteriaBuilder cb = cbf.create(em, RecursiveEntity.class, "r") .whereExists() @@ -490,7 +472,7 @@ public void testInlineCTEInCorrelatedSubquery() { } @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoEclipselink.class }) public void testInlineEntityWithLimit() { CriteriaBuilder cb = cbf.create(em, RecursiveEntity.class) .fromEntitySubquery(RecursiveEntity.class, "t") @@ -509,7 +491,7 @@ public void testInlineEntityWithLimit() { // Test for #1285 @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoEclipselink.class }) public void testJoinOnSubquery() { CriteriaBuilder cb = cbf.create(em, RecursiveEntity.class) .from(RecursiveEntity.class, "t") @@ -532,10 +514,8 @@ public void testJoinOnSubquery() { assertEquals(1, resultList.size()); } - // NOTE: Entity joins are only supported on Hibernate 5.1+ - // NOTE: Hibernate 5.1 renders t.id = tSub.id rather than t = tSub @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class, NoHibernate42.class, NoHibernate43.class, NoHibernate50.class, NoHibernate51.class}) + @Category({ NoEclipselink.class }) public void testMultipleInlineEntityWithLimitJoin() { CriteriaBuilder cb = cbf.create(em, RecursiveEntity.class) .fromEntitySubquery(RecursiveEntity.class, "t") @@ -567,9 +547,8 @@ public void testMultipleInlineEntityWithLimitJoin() { assertEquals(1, resultList.size()); } - // NOTE: Entity joins are only supported on Hibernate 5.1+ @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class, NoHibernate42.class, NoHibernate43.class, NoHibernate50.class }) + @Category({ NoEclipselink.class }) public void testJoinInlineEntityWithLimit() { CriteriaBuilder cb = cbf.create(em, RecursiveEntity.class) .fromValues(RecursiveEntity.class, "name", "val", Collections.singletonList("child1_1")) @@ -590,10 +569,9 @@ public void testJoinInlineEntityWithLimit() { assertEquals(1, resultList.size()); } - // NOTE: H2 and old MySQL do not support lateral joins - // NOTE: Entity joins are only supported on Hibernate 5.1+ + // NOTE: H2 does not support lateral joins @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class, NoH2.class, NoMySQLOld.class, NoHibernate42.class, NoHibernate43.class, NoHibernate50.class }) + @Category({ NoEclipselink.class, NoH2.class }) public void testJoinLateralEntityWithLimit() { CriteriaBuilder cb = cbf.create(em, RecursiveEntity.class) .fromValues(RecursiveEntity.class, "name", "val", Collections.singletonList("child1_1")) @@ -615,10 +593,9 @@ public void testJoinLateralEntityWithLimit() { assertEquals(1, resultList.size()); } - // NOTE: H2 and old MySQL do not support lateral joins - // NOTE: Entity joins are only supported on Hibernate 5.1+ + // NOTE: H2 does not support lateral joins @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class, NoH2.class, NoMySQLOld.class, NoHibernate42.class, NoHibernate43.class, NoHibernate50.class }) + @Category({ NoEclipselink.class, NoH2.class }) public void testJoinLateralCorrelationEntityWithLimit() { CriteriaBuilder cb = cbf.create(em, RecursiveEntity.class) .from(RecursiveEntity.class, "x") @@ -630,7 +607,7 @@ public void testJoinLateralCorrelationEntityWithLimit() { .on("1").eqExpression("1") .end() .select("t"); - String expectedSubquery = "SELECT r.id, r.name, r.parent.id FROM RecursiveEntity r WHERE r.parent.id = x.id ORDER BY r.name ASC LIMIT 1"; + String expectedSubquery = "SELECT r.id, r.name, r.parent.id FROM x.children r ORDER BY r.name ASC LIMIT 1"; String expected = "" + "SELECT t FROM RecursiveEntity x LEFT JOIN LATERAL RecursiveEntity(" + expectedSubquery + ") t(id, name, parent.id)" + onClause("1 = 1") + " WHERE x.name = :param_0"; @@ -639,10 +616,9 @@ public void testJoinLateralCorrelationEntityWithLimit() { assertEquals(1, resultList.size()); } - // NOTE: H2 and old MySQL do not support lateral joins - // NOTE: Entity joins are only supported on Hibernate 5.1+ + // NOTE: H2 does not support lateral joins @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class, NoH2.class, NoMySQLOld.class, NoHibernate42.class, NoHibernate43.class, NoHibernate50.class }) + @Category({ NoEclipselink.class, NoH2.class }) public void testJoinLateralCorrelationEntityJoinTableWithLimit() { CriteriaBuilder cb = cbf.create(em, RecursiveEntity.class) .from(RecursiveEntity.class, "x") @@ -664,10 +640,9 @@ public void testJoinLateralCorrelationEntityJoinTableWithLimit() { } // Test for #1193 - // NOTE: H2 and old MySQL do not support lateral joins - // NOTE: Entity joins are only supported on Hibernate 5.1+ + // NOTE: H2 does not support lateral joins @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class, NoH2.class, NoMySQLOld.class, NoHibernate42.class, NoHibernate43.class, NoHibernate50.class }) + @Category({ NoEclipselink.class, NoH2.class }) public void testJoinLateralWithArrayExpressionImplicitJoin() { CriteriaBuilder cb = cbf.create(em, RecursiveEntity.class) .from(RecursiveEntity.class, "x") @@ -684,19 +659,16 @@ public void testJoinLateralWithArrayExpressionImplicitJoin() { } // Additional test for #1193 - // NOTE: H2 and old MySQL do not support lateral joins - // NOTE: Entity joins are only supported on Hibernate 5.1+ + // NOTE: H2 does not support lateral joins @Test -// @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class, NoH2.class, NoMySQLOld.class, NoHibernate42.class, NoHibernate43.class, NoHibernate50.class }) - // NOTE: This requires joins to be ordered correctly which is only fixed in Hibernate 5.4.22+. Also see https://hibernate.atlassian.net/browse/HHH-14201 - @Ignore + @Category({ NoEclipselink.class, NoH2.class }) public void testJoinLateralWithElementArrayExpressionImplicitJoin() { CriteriaBuilder cb = cbf.create(em, RecursiveEntity.class) .from(RecursiveEntity.class, "x") .leftJoinLateralEntitySubquery("x.children[name = x.parent.name]", "t", "r").end() .where("x.name").eq("root1") .select("t"); - String expectedSubquery = "SELECT r.id, r.name, r.parent.id FROM RecursiveEntity x_children_base, RecursiveEntity x_parent_base LEFT JOIN x_parent_base.parent parent_1 JOIN x_children_base.children r ON (r.name = parent_1.name) WHERE x.id = x_children_base.id AND x.id = x_parent_base.id"; + String expectedSubquery = "SELECT r.id, r.name, r.parent.id FROM RecursiveEntity x_children_base CROSS JOIN RecursiveEntity x_parent_base LEFT JOIN x_parent_base.parent parent_1 JOIN x_children_base.children r ON (r.name = parent_1.name) WHERE x.id = x_children_base.id AND x.id = x_parent_base.id"; String expected = "" + "SELECT t FROM RecursiveEntity x LEFT JOIN LATERAL RecursiveEntity(" + expectedSubquery + ") t(id, name, parent.id)" + onClause("1 = 1") + " WHERE x.name = :param_0"; diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/InsertTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/InsertTest.java index ba18bf7717..0b43237563 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/InsertTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/InsertTest.java @@ -5,14 +5,8 @@ package com.blazebit.persistence.testsuite; -import static org.junit.Assert.assertEquals; - import java.util.List; -import javax.persistence.EntityManager; - -import com.blazebit.persistence.testsuite.base.jpa.category.NoMySQLOld; -import com.blazebit.persistence.testsuite.tx.TxWork; import org.junit.Before; import org.junit.Test; import org.junit.experimental.categories.Category; @@ -20,22 +14,21 @@ import com.blazebit.persistence.CriteriaBuilder; import com.blazebit.persistence.InsertCriteriaBuilder; import com.blazebit.persistence.ReturningResult; -import com.blazebit.persistence.testsuite.base.jpa.category.NoDatanucleus; import com.blazebit.persistence.testsuite.base.jpa.category.NoEclipselink; -import com.blazebit.persistence.testsuite.base.jpa.category.NoFirebird; import com.blazebit.persistence.testsuite.base.jpa.category.NoH2; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate42; +import com.blazebit.persistence.testsuite.base.jpa.category.NoMSSQL; import com.blazebit.persistence.testsuite.base.jpa.category.NoMySQL; -import com.blazebit.persistence.testsuite.base.jpa.category.NoOpenJPA; import com.blazebit.persistence.testsuite.base.jpa.category.NoOracle; -import com.blazebit.persistence.testsuite.base.jpa.category.NoSQLite; -import com.blazebit.persistence.testsuite.base.jpa.category.NoMSSQL; import com.blazebit.persistence.testsuite.entity.DeletePersonCTE; import com.blazebit.persistence.testsuite.entity.Document; import com.blazebit.persistence.testsuite.entity.IdHolderCTE; import com.blazebit.persistence.testsuite.entity.Person; import com.blazebit.persistence.testsuite.entity.PersonCTE; import com.blazebit.persistence.testsuite.tx.TxVoidWork; +import com.blazebit.persistence.testsuite.tx.TxWork; +import jakarta.persistence.EntityManager; + +import static org.junit.Assert.assertEquals; /** * @@ -43,6 +36,7 @@ * @since 1.1.0 */ // NOTE: Oracle is problematic due to #306 +// Can't run these tests with MySQL public class InsertTest extends AbstractCoreTest { private Person p1; @@ -74,7 +68,7 @@ public void work(EntityManager em) { } @Test - @Category({ NoOracle.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoOracle.class, NoMySQL.class, NoEclipselink.class }) public void testSimple() { transactional(new TxVoidWork() { @Override @@ -98,7 +92,7 @@ public void work(EntityManager em) { } @Test - @Category({ NoOracle.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoOracle.class, NoMySQL.class, NoEclipselink.class }) public void testSimpleWithLimit() { transactional(new TxVoidWork() { @Override @@ -123,7 +117,7 @@ public void work(EntityManager em) { } @Test - @Category({ NoOracle.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoOracle.class, NoMySQL.class, NoEclipselink.class }) public void testSimpleWithLimitAndOffset() { transactional(new TxVoidWork() { @Override @@ -148,9 +142,8 @@ public void work(EntityManager em) { }); } - // NOTE: hibernate 4.2 does not support using parameters in the select clause @Test - @Category({ NoHibernate42.class, NoOracle.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoOracle.class, NoMySQL.class, NoEclipselink.class }) public void testSimpleWithParameters() { transactional(new TxVoidWork() { @Override @@ -177,7 +170,7 @@ public void work(EntityManager em) { // NOTE: H2 does not support returning all generated keys @Test - @Category({ NoH2.class, NoOracle.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoH2.class, NoOracle.class, NoMySQL.class, NoEclipselink.class }) public void testReturningAll() { ReturningResult result = transactional(new TxWork>() { @Override @@ -206,7 +199,7 @@ public ReturningResult work(EntityManager em) { } @Test - @Category({ NoOracle.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoOracle.class, NoMySQL.class, NoEclipselink.class }) public void testReturningLast() { ReturningResult result = transactional(new TxWork>() { @Override @@ -233,7 +226,7 @@ public ReturningResult work(EntityManager em) { } @Test - @Category({ NoOracle.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoOracle.class, NoMySQL.class, NoEclipselink.class }) public void testReturningLastWithParameter() { ReturningResult result = transactional(new TxWork>() { @Override @@ -262,7 +255,7 @@ public ReturningResult work(EntityManager em) { // TODO: This does not work with sequences for H2 because the next value of the sequence is evaluated regardless of the limit @Test - @Category({ NoOracle.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoOracle.class, NoMySQL.class, NoEclipselink.class }) public void testReturningLastWithLimit() { ReturningResult result = transactional(new TxWork>() { @Override @@ -290,9 +283,8 @@ public ReturningResult work(EntityManager em) { } // NOTE: H2 and MySQL only support returning generated keys - // NOTE: MySQL does not support CTEs @Test - @Category({ NoH2.class, NoOracle.class, NoMySQLOld.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoH2.class, NoMySQL.class, NoOracle.class, NoEclipselink.class }) public void testReturningLastWithCte() { ReturningResult result = transactional(new TxWork>() { @Override @@ -331,9 +323,8 @@ public ReturningResult work(EntityManager em) { } // NOTE: H2 and MySQL only support returning generated keys - // NOTE: MySQL does not support CTEs @Test - @Category({ NoH2.class, NoOracle.class, NoMySQLOld.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoH2.class, NoOracle.class, NoMySQL.class, NoEclipselink.class }) public void testReturningLastWithCteAndLimit() { ReturningResult result = transactional(new TxWork>() { @Override @@ -372,9 +363,8 @@ public ReturningResult work(EntityManager em) { } // NOTE: Currently only PostgreSQL and DB2 support returning from within a CTE - // NOTE: hibernate 4.2 does not support using parameters in the select clause @Test - @Category({ NoH2.class, NoOracle.class, NoMSSQL.class, NoSQLite.class, NoFirebird.class, NoMySQL.class, NoHibernate42.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoH2.class, NoOracle.class, NoMSSQL.class, NoMySQL.class, NoEclipselink.class }) public void testDeleteReturningWithCteAndLimitInto() { ReturningResult result = transactional(new TxWork>() { @Override @@ -414,9 +404,8 @@ public ReturningResult work(EntityManager em) { } // NOTE: Currently only PostgreSQL and DB2 support returning from within a CTE - // NOTE: hibernate 4.2 does not support using parameters in the select clause @Test - @Category({ NoH2.class, NoOracle.class, NoMSSQL.class, NoSQLite.class, NoFirebird.class, NoMySQL.class, NoHibernate42.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoH2.class, NoOracle.class, NoMSSQL.class, NoMySQL.class, NoEclipselink.class }) public void testInsertReturningSelectOld() { transactional(new TxVoidWork() { @Override @@ -455,9 +444,8 @@ public void work(EntityManager em) { } // NOTE: Currently only PostgreSQL and DB2 support returning from within a CTE - // NOTE: hibernate 4.2 does not support using parameters in the select clause @Test - @Category({ NoH2.class, NoOracle.class, NoMSSQL.class, NoSQLite.class, NoFirebird.class, NoMySQL.class, NoHibernate42.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoH2.class, NoOracle.class, NoMSSQL.class, NoMySQL.class, NoEclipselink.class }) public void testInsertReturningSelectNew() { transactional(new TxVoidWork() { @Override @@ -495,9 +483,8 @@ public void work(EntityManager em) { } // Test for #1737 - // NOTE: hibernate 4.2 does not support using parameters in the select clause @Test - @Category({ NoOracle.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class, NoHibernate42.class }) + @Category({ NoOracle.class, NoMySQL.class, NoEclipselink.class }) public void testAssociationParameter() { transactional(new TxVoidWork() { @Override diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/Issue1114Test.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/Issue1114Test.java index a55c7ba94e..fdcabb80ef 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/Issue1114Test.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/Issue1114Test.java @@ -4,11 +4,15 @@ */ package com.blazebit.persistence.testsuite; -import com.blazebit.persistence.testsuite.base.jpa.category.NoDatanucleus; +import java.util.HashSet; +import java.util.List; +import java.util.function.Function; + +import org.junit.Test; +import org.junit.experimental.categories.Category; + import com.blazebit.persistence.testsuite.base.jpa.category.NoEclipselink; import com.blazebit.persistence.testsuite.base.jpa.category.NoH2; -import com.blazebit.persistence.testsuite.base.jpa.category.NoMySQLOld; -import com.blazebit.persistence.testsuite.base.jpa.category.NoOpenJPA; import com.blazebit.persistence.testsuite.entity.DeletePersonCTE; import com.blazebit.persistence.testsuite.entity.Document; import com.blazebit.persistence.testsuite.entity.IntIdEntity; @@ -17,13 +21,7 @@ import com.blazebit.persistence.testsuite.entity.Version; import com.blazebit.persistence.testsuite.entity.Workflow; import com.blazebit.persistence.testsuite.tx.TxVoidWork; -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import javax.persistence.EntityManager; -import java.util.HashSet; -import java.util.List; -import java.util.function.Function; +import jakarta.persistence.EntityManager; import static org.junit.Assert.assertEquals; @@ -81,7 +79,7 @@ public void work(EntityManager em) { // Test for issue #1114 @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class, NoMySQLOld.class, NoH2.class }) + @Category({ NoEclipselink.class, NoH2.class }) public void testLimitedCteWithoutLimitInMainQueryButWithCollectionFetch() { Function> fetchPersonBatch = batch -> cbf.create(em, Person.class) diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/Issue1228Test.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/Issue1228Test.java index d45215674c..eb0a9b2a18 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/Issue1228Test.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/Issue1228Test.java @@ -9,8 +9,8 @@ import java.util.ArrayList; import java.util.List; -import javax.persistence.EntityManager; -import javax.persistence.Tuple; +import jakarta.persistence.EntityManager; +import jakarta.persistence.Tuple; import org.junit.Test; diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/Issue571Test.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/Issue571Test.java index 50a447a97f..1f9577be9f 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/Issue571Test.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/Issue571Test.java @@ -5,35 +5,30 @@ package com.blazebit.persistence.testsuite; +import java.io.Serializable; +import java.util.Objects; + +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.experimental.categories.Category; +import org.junit.rules.ExpectedException; + import com.blazebit.persistence.CTE; import com.blazebit.persistence.CriteriaBuilder; import com.blazebit.persistence.impl.query.CustomSQLTypedQuery; -import com.blazebit.persistence.testsuite.base.jpa.category.NoDatanucleus; import com.blazebit.persistence.testsuite.base.jpa.category.NoEclipselink; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate42; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate43; -import com.blazebit.persistence.testsuite.base.jpa.category.NoMySQL; -import com.blazebit.persistence.testsuite.base.jpa.category.NoMySQLOld; -import com.blazebit.persistence.testsuite.base.jpa.category.NoOpenJPA; import com.blazebit.persistence.testsuite.base.jpa.category.NoOracle; import com.blazebit.persistence.testsuite.entity.IdClassEntity; import com.blazebit.persistence.testsuite.entity.IdClassEntityId; import com.blazebit.persistence.testsuite.tx.TxVoidWork; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.experimental.categories.Category; -import org.junit.rules.ExpectedException; - -import javax.persistence.Entity; -import javax.persistence.EntityManager; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.IdClass; -import javax.persistence.ManyToOne; -import java.io.Serializable; -import java.util.Objects; +import jakarta.persistence.Entity; +import jakarta.persistence.EntityManager; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.IdClass; +import jakarta.persistence.ManyToOne; import static org.junit.Assert.assertEquals; @@ -64,8 +59,8 @@ public void work(EntityManager em) { } @Test - // Ignore MySQL / Oracle because of unsupported use of CTE's, ignore Hibernate 4.3 and 4.3 metamodel bug - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class, NoMySQLOld.class, NoOracle.class, NoHibernate42.class, NoHibernate43.class }) + // Ignore MySQL / Oracle because of unsupported use of CTE's + @Category({ NoEclipselink.class, NoOracle.class }) public void testBindingCteAssociationToEntity() { transactional(new TxVoidWork() { @Override @@ -104,8 +99,8 @@ public void work(EntityManager em) { } @Test - // Ignore MySQL / Oracle because of unsuppored use of CTE's, ignore Hibernate 4.3 and 4.3 metamodel bug - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class, NoMySQLOld.class, NoOracle.class, NoHibernate42.class, NoHibernate43.class }) + // Ignore MySQL / Oracle because of unsuppored use of CTE's + @Category({ NoEclipselink.class, NoOracle.class }) public void testBindingCteAssociationToEntityId() { expectedException.expectMessage("An association should be bound to its association type and not its identifier type"); @@ -148,7 +143,7 @@ public void work(EntityManager em) { @Test // Ignore MySQL / Oracle because of unsuppored use of CTE's, ignore Hibernate 4.3 and 4.3 metamodel bug - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class, NoMySQLOld.class, NoOracle.class, NoHibernate42.class, NoHibernate43.class }) + @Category({ NoEclipselink.class, NoOracle.class }) public void testBindingCteAssociationIdToEntityId() { transactional(new TxVoidWork() { @Override @@ -188,8 +183,8 @@ public void work(EntityManager em) { } @Test - // Ignore MySQL / Oracle because of unsupported use of CTE's, ignore Hibernate 4.3 and 4.3 metamodel bug - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class, NoMySQLOld.class, NoOracle.class, NoHibernate42.class, NoHibernate43.class }) + // Ignore MySQL / Oracle because of unsupported use of CTE's + @Category({ NoEclipselink.class, NoOracle.class }) public void testBindingCteUsingNestedIdClass() { transactional(new TxVoidWork() { @Override diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/JoinOnTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/JoinOnTest.java index 2dbc5c2aed..60387d9b0d 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/JoinOnTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/JoinOnTest.java @@ -5,21 +5,15 @@ package com.blazebit.persistence.testsuite; -import static org.junit.Assert.assertEquals; - -import com.blazebit.persistence.PaginatedCriteriaBuilder; -import com.blazebit.persistence.testsuite.base.jpa.category.NoDatanucleus4; -import com.blazebit.persistence.testsuite.base.jpa.category.NoEclipselink; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate42; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate43; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate50; -import com.blazebit.persistence.testsuite.base.jpa.category.NoOpenJPA; import org.junit.Test; +import org.junit.experimental.categories.Category; import com.blazebit.persistence.CriteriaBuilder; +import com.blazebit.persistence.testsuite.base.jpa.category.NoEclipselink; import com.blazebit.persistence.testsuite.entity.Document; import com.blazebit.persistence.testsuite.entity.Person; -import org.junit.experimental.categories.Category; + +import static org.junit.Assert.assertEquals; /** * @@ -125,7 +119,6 @@ public void testLeftJoinOnSubquery() { } @Test - @Category({ NoHibernate42.class, NoHibernate43.class, NoHibernate50.class, NoDatanucleus4.class, NoOpenJPA.class}) public void testJoinAvoidance() { CriteriaBuilder crit = cbf.create(em, String.class).from(Document.class, "e"); crit.select("e.responsiblePerson.name"); @@ -148,7 +141,7 @@ public void testJoinAvoidance() { } @Test - @Category({ NoEclipselink.class, NoHibernate42.class, NoHibernate43.class, NoHibernate50.class }) + @Category({ NoEclipselink.class }) // NOTE: Subquery support in ON clause is only possible with Hibernate 5.1+ // TODO: report eclipselink does not support subqueries in functions public void testJoinWithSubqueryBuilder() { diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/JoinTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/JoinTest.java index 9ceb806bb6..f72cc9c0a9 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/JoinTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/JoinTest.java @@ -5,26 +5,8 @@ package com.blazebit.persistence.testsuite; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; - import java.util.List; -import javax.persistence.EntityManager; -import javax.persistence.Tuple; - -import com.blazebit.persistence.testsuite.base.jpa.category.NoDatanucleus; -import com.blazebit.persistence.testsuite.base.jpa.category.NoEclipselink; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate42; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate43; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate50; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate51; -import com.blazebit.persistence.testsuite.base.jpa.category.NoOpenJPA; -import com.blazebit.persistence.testsuite.entity.DocumentForEntityKeyMaps; -import com.blazebit.persistence.testsuite.entity.PersonForEntityKeyMaps; -import com.blazebit.persistence.testsuite.entity.Version; -import com.blazebit.persistence.testsuite.tx.TxVoidWork; import org.junit.Test; import org.junit.experimental.categories.Category; @@ -32,8 +14,19 @@ import com.blazebit.persistence.JoinType; import com.blazebit.persistence.PaginatedCriteriaBuilder; import com.blazebit.persistence.testsuite.base.jpa.category.NoDB2; +import com.blazebit.persistence.testsuite.base.jpa.category.NoEclipselink; +import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate; import com.blazebit.persistence.testsuite.entity.Document; +import com.blazebit.persistence.testsuite.entity.DocumentForEntityKeyMaps; import com.blazebit.persistence.testsuite.entity.Person; +import com.blazebit.persistence.testsuite.entity.PersonForEntityKeyMaps; +import com.blazebit.persistence.testsuite.entity.Version; +import com.blazebit.persistence.testsuite.tx.TxVoidWork; +import jakarta.persistence.EntityManager; +import jakarta.persistence.Tuple; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; /** * @@ -368,8 +361,6 @@ public void selectWithFetchMultipleRelations() { } @Test - // Older Hibernate versions don't like fetch joining an element collection at all: https://hibernate.atlassian.net/browse/HHH-11140 - @Category({ NoHibernate42.class, NoHibernate43.class, NoHibernate50.class, NoHibernate51.class }) public void selectWithFetchElementCollectionOnly() { CriteriaBuilder crit = cbf.create(em, Document.class, "a"); crit.select("owner"); @@ -468,7 +459,7 @@ public void testPaginatedJoinFetch(){ // NOTE: DB2 9.7 which is what we've got on Travis CI does not support subqueries in the on clause. See http://www-01.ibm.com/support/knowledgecenter/SSEPGG_9.7.0/com.ibm.db2.luw.messages.sql.doc/doc/msql00338n.html?cp=SSEPGG_9.7.0 // NOTE: Hibernate < 5.1 need to refer to other from clause elements which isn't supported until 5.1 @Test - @Category({ NoDB2.class, NoHibernate42.class, NoHibernate43.class, NoHibernate50.class }) + @Category({ NoDB2.class }) public void testSizeInOnClause() { CriteriaBuilder crit = cbf.create(em, Document.class, "d") .leftJoinOn("d.partners", "p").on("SIZE(d.versions)").gtExpression("2").end(); @@ -519,7 +510,7 @@ public void work(EntityManager em) { @Test // Only hibernate supports single valued association id expressions without needing to join - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoEclipselink.class }) public void testEntityJoinEmulationReverseJoinDependencyBug() { CriteriaBuilder crit = cbf.create(em, Long.class) .from(Document.class, "d") diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/JpqlFunctionTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/JpqlFunctionTest.java index d5f772d2ba..3c6395ffc5 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/JpqlFunctionTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/JpqlFunctionTest.java @@ -5,40 +5,34 @@ package com.blazebit.persistence.testsuite; -import static org.junit.Assert.assertEquals; - import java.util.List; import java.util.Map; import java.util.regex.Pattern; -import javax.persistence.EntityManager; +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; +import org.junit.experimental.categories.Category; +import com.blazebit.persistence.CriteriaBuilder; import com.blazebit.persistence.spi.JpqlFunction; import com.blazebit.persistence.testsuite.base.jpa.assertion.AssertStatement; import com.blazebit.persistence.testsuite.base.jpa.category.NoDB2; -import com.blazebit.persistence.testsuite.base.jpa.category.NoDatanucleus; import com.blazebit.persistence.testsuite.base.jpa.category.NoEclipselink; -import com.blazebit.persistence.testsuite.base.jpa.category.NoFirebird; import com.blazebit.persistence.testsuite.base.jpa.category.NoH2; import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate; import com.blazebit.persistence.testsuite.base.jpa.category.NoMSSQL; import com.blazebit.persistence.testsuite.base.jpa.category.NoMySQL; -import com.blazebit.persistence.testsuite.base.jpa.category.NoOpenJPA; import com.blazebit.persistence.testsuite.base.jpa.category.NoOracle; import com.blazebit.persistence.testsuite.base.jpa.category.NoPostgreSQL; -import com.blazebit.persistence.testsuite.base.jpa.category.NoSQLite; +import com.blazebit.persistence.testsuite.entity.Document; import com.blazebit.persistence.testsuite.entity.DocumentType; +import com.blazebit.persistence.testsuite.entity.Person; import com.blazebit.persistence.testsuite.tx.TxVoidWork; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; +import jakarta.persistence.EntityManager; -import com.blazebit.persistence.CriteriaBuilder; -import com.blazebit.persistence.testsuite.entity.Document; -import com.blazebit.persistence.testsuite.entity.Person; -import org.junit.experimental.categories.Categories; -import org.junit.experimental.categories.Category; +import static org.junit.Assert.assertEquals; /** * @@ -162,7 +156,7 @@ public void builtinFunctionsReturnCorrectTypes() { } @Test - @Category({ NoPostgreSQL.class, NoDB2.class, NoOracle.class, NoSQLite.class, NoFirebird.class, NoH2.class, NoMSSQL.class, NoEclipselink.class}) + @Category({ NoPostgreSQL.class, NoDB2.class, NoOracle.class, NoH2.class, NoMSSQL.class, NoEclipselink.class}) public void testCastFunctionWithTargetTypeOverrideMysql() { testCastFunctionWithTargetTypeOverride("unsigned"); } @@ -192,7 +186,7 @@ public void validate(String query) { } @Test - @Category({ NoHibernate.class, NoDatanucleus.class, NoOpenJPA.class }) + @Category({ NoHibernate.class }) public void testCastFunctionWithTargetTypeOverrideEclipselink() { final String castTypeOverride = "smallint"; CriteriaBuilder cb = cbf.create(em, Integer.class).from(Document.class, "d") diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/JsonAndXmlTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/JsonAndXmlTest.java index b9f5c9a484..e4a58574c1 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/JsonAndXmlTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/JsonAndXmlTest.java @@ -5,27 +5,26 @@ package com.blazebit.persistence.testsuite; +import java.util.Arrays; +import java.util.Iterator; +import java.util.List; +import java.util.Objects; + +import org.junit.Assert; +import org.junit.Test; +import org.junit.experimental.categories.Category; + import com.blazebit.persistence.CriteriaBuilder; import com.blazebit.persistence.parser.JsonParser; import com.blazebit.persistence.parser.XmlParser; import com.blazebit.persistence.testsuite.base.jpa.category.NoDB2; -import com.blazebit.persistence.testsuite.base.jpa.category.NoDatanucleus; import com.blazebit.persistence.testsuite.base.jpa.category.NoEclipselink; import com.blazebit.persistence.testsuite.entity.Document; import com.blazebit.persistence.testsuite.entity.Person; import com.blazebit.persistence.testsuite.entity.Version; import com.blazebit.persistence.testsuite.tx.TxVoidWork; -import org.junit.Assert; -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import javax.persistence.EntityManager; -import javax.persistence.Tuple; -import java.util.Arrays; -import java.util.Collections; -import java.util.Iterator; -import java.util.List; -import java.util.Objects; +import jakarta.persistence.EntityManager; +import jakarta.persistence.Tuple; import static org.junit.Assert.assertEquals; @@ -71,7 +70,7 @@ public void work(EntityManager em) { // NOTE: EclipseLink can't handle multiple subquery select items... Only one expression can be declared in a SELECT clause of a subquery // NOTE: DataNucleus can't handle multiple subquery select items... Number of result expressions in subquery should be 1 @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoDB2.class }) + @Category({ NoEclipselink.class, NoDB2.class }) public void testToStringJson() { CriteriaBuilder criteria = cbf.create(em, Tuple.class) .from(Person.class, "p") @@ -95,7 +94,7 @@ public void testToStringJson() { // NOTE: EclipseLink can't handle multiple subquery select items... Only one expression can be declared in a SELECT clause of a subquery // NOTE: DataNucleus can't handle multiple subquery select items... Number of result expressions in subquery should be 1 @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoDB2.class }) + @Category({ NoEclipselink.class, NoDB2.class }) public void testToStringXml() { CriteriaBuilder criteria = cbf.create(em, Tuple.class) .from(Person.class, "p") @@ -157,7 +156,7 @@ public void testStringXmlAgg() { // NOTE: EclipseLink can't handle multiple subquery select items... Only one expression can be declared in a SELECT clause of a subquery // NOTE: DataNucleus can't handle multiple subquery select items... Number of result expressions in subquery should be 1 @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoDB2.class }) + @Category({ NoEclipselink.class, NoDB2.class }) public void testToMultiset() { CriteriaBuilder criteria = cbf.create(em, Tuple.class) .from(Person.class, "p") @@ -181,7 +180,7 @@ public void testToMultiset() { // NOTE: EclipseLink can't handle multiple subquery select items... Only one expression can be declared in a SELECT clause of a subquery // NOTE: DataNucleus can't handle multiple subquery select items... Number of result expressions in subquery should be 1 @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoDB2.class }) + @Category({ NoEclipselink.class, NoDB2.class }) public void testNestedToMultiset() { CriteriaBuilder criteria = cbf.create(em, Tuple.class) .from(Person.class, "p") diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/JsonGetAndSetTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/JsonGetAndSetTest.java index f5f0e92e33..9073a2fb24 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/JsonGetAndSetTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/JsonGetAndSetTest.java @@ -4,25 +4,24 @@ */ package com.blazebit.persistence.testsuite; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; +import java.util.List; + +import org.junit.Test; +import org.junit.experimental.categories.Category; -import com.blazebit.persistence.testsuite.base.jpa.category.NoFirebird; import com.blazebit.persistence.testsuite.base.jpa.category.NoH2; -import com.blazebit.persistence.testsuite.base.jpa.category.NoMySQLOld; import com.blazebit.persistence.testsuite.base.jpa.category.NoOracle; -import com.blazebit.persistence.testsuite.base.jpa.category.NoSQLite; import com.blazebit.persistence.testsuite.entity.JsonDocument; import com.blazebit.persistence.testsuite.tx.TxVoidWork; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.List; -import javax.persistence.EntityManager; -import javax.persistence.Tuple; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import jakarta.persistence.EntityManager; +import jakarta.persistence.Tuple; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; /** * @author Moritz Becker @@ -56,7 +55,7 @@ public void work(EntityManager em) { } @Test - @Category({ NoH2.class, NoSQLite.class, NoFirebird.class }) + @Category({ NoH2.class }) public void testJsonGetWithLiteralPathElements() throws JsonProcessingException { List objectRootResult = cbf.create(em, Tuple.class).from(JsonDocument.class, "d") .select("d.content") @@ -102,7 +101,7 @@ public void testJsonGetWithLiteralPathElements() throws JsonProcessingException } @Test - @Category({ NoH2.class, NoSQLite.class, NoFirebird.class }) + @Category({ NoH2.class }) public void testJsonGetWithLiteralJsonPath() throws JsonProcessingException { List objectRootResult = cbf.create(em, Tuple.class).from(JsonDocument.class, "d") .select("d.content") @@ -124,7 +123,7 @@ public void testJsonGetWithLiteralJsonPath() throws JsonProcessingException { } @Test - @Category({ NoH2.class, NoSQLite.class, NoFirebird.class, NoOracle.class }) + @Category({ NoH2.class, NoOracle.class }) public void testJsonGetWithParameterizedJsonPath() throws JsonProcessingException { List objectRootResult = cbf.create(em, Tuple.class).from(JsonDocument.class, "d") .select("d.content") @@ -160,7 +159,7 @@ public void testJsonGetWithParameterizedJsonPath() throws JsonProcessingExceptio } @Test - @Category({ NoH2.class, NoSQLite.class, NoFirebird.class, NoMySQLOld.class }) + @Category({ NoH2.class }) public void testJsonSet() throws JsonProcessingException { List objectRootResult = cbf.create(em, Tuple.class).from(JsonDocument.class, "d") .select("d.content") @@ -205,7 +204,7 @@ public void testJsonSet() throws JsonProcessingException { } @Test - @Category({ NoH2.class, NoSQLite.class, NoFirebird.class, NoMySQLOld.class, NoOracle.class }) + @Category({ NoH2.class, NoOracle.class }) public void testJsonSetNull() throws JsonProcessingException { List objectRootResult = cbf.create(em, Tuple.class).from(JsonDocument.class, "d") .select("d.content") diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/KeysetPaginationNullsTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/KeysetPaginationNullsTest.java index f4da7b7031..a664dd3f88 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/KeysetPaginationNullsTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/KeysetPaginationNullsTest.java @@ -16,8 +16,8 @@ import org.junit.runner.RunWith; import org.junit.runners.Parameterized; -import javax.persistence.EntityManager; -import javax.persistence.Tuple; +import jakarta.persistence.EntityManager; +import jakarta.persistence.Tuple; import java.io.Serializable; import java.util.ArrayList; import java.util.Collection; diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/KeysetPaginationPage1EdgeCaseFallbackTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/KeysetPaginationPage1EdgeCaseFallbackTest.java index 6b56d91476..0c0f852f1a 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/KeysetPaginationPage1EdgeCaseFallbackTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/KeysetPaginationPage1EdgeCaseFallbackTest.java @@ -16,8 +16,8 @@ import com.blazebit.persistence.testsuite.tx.TxVoidWork; import org.junit.Test; -import javax.persistence.EntityManager; -import javax.persistence.Tuple; +import jakarta.persistence.EntityManager; +import jakarta.persistence.Tuple; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/KeysetPaginationTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/KeysetPaginationTest.java index b4ffb0a8bf..914d490d43 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/KeysetPaginationTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/KeysetPaginationTest.java @@ -20,8 +20,8 @@ import org.junit.Test; import org.junit.experimental.categories.Category; -import javax.persistence.EntityManager; -import javax.persistence.Tuple; +import jakarta.persistence.EntityManager; +import jakarta.persistence.Tuple; import java.util.List; import static org.junit.Assert.assertEquals; diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/LimitTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/LimitTest.java index f9a57dea3f..9bf0ece6fe 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/LimitTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/LimitTest.java @@ -5,17 +5,18 @@ package com.blazebit.persistence.testsuite; +import java.util.List; + +import org.junit.Test; +import org.junit.experimental.categories.Category; + import com.blazebit.persistence.CriteriaBuilder; import com.blazebit.persistence.testsuite.base.jpa.category.NoDB2; -import com.blazebit.persistence.testsuite.base.jpa.category.NoDatanucleus; import com.blazebit.persistence.testsuite.base.jpa.category.NoEclipselink; -import com.blazebit.persistence.testsuite.base.jpa.category.NoFirebird; import com.blazebit.persistence.testsuite.base.jpa.category.NoH2; import com.blazebit.persistence.testsuite.base.jpa.category.NoMSSQL; import com.blazebit.persistence.testsuite.base.jpa.category.NoMySQL; -import com.blazebit.persistence.testsuite.base.jpa.category.NoOpenJPA; import com.blazebit.persistence.testsuite.base.jpa.category.NoOracle; -import com.blazebit.persistence.testsuite.base.jpa.category.NoSQLite; import com.blazebit.persistence.testsuite.entity.DeletePersonCTE; import com.blazebit.persistence.testsuite.entity.Document; import com.blazebit.persistence.testsuite.entity.IntIdEntity; @@ -23,11 +24,7 @@ import com.blazebit.persistence.testsuite.entity.Version; import com.blazebit.persistence.testsuite.entity.Workflow; import com.blazebit.persistence.testsuite.tx.TxVoidWork; -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import javax.persistence.EntityManager; -import java.util.List; +import jakarta.persistence.EntityManager; import static org.junit.Assert.assertEquals; @@ -87,8 +84,9 @@ public void testSubqueryLimit() { } @Test - @Category(NoEclipselink.class) + // MySQL doesn't support limit in subquery of IN predicate // TODO: report eclipselink does not support subqueries in functions + @Category({ NoMySQL.class, NoEclipselink.class }) public void testSubqueryAndOuterQueryLimit() { CriteriaBuilder cb = cbf.create(em, Person.class, "p"); cb.where("p.id").in() @@ -109,7 +107,7 @@ public void testSubqueryAndOuterQueryLimit() { // Test for issue #774 @Test - @Category({NoH2.class, NoDB2.class, NoFirebird.class, NoMSSQL.class, NoMySQL.class, NoOracle.class, NoSQLite.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class}) + @Category({NoH2.class, NoDB2.class, NoMSSQL.class, NoMySQL.class, NoOracle.class, NoEclipselink.class }) public void testModificationCteQueryWithLimitInMainQuery() { List deletedPersons = cbf.create(em, DeletePersonCTE.class) .withReturning(DeletePersonCTE.class) diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/ListaggTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/ListaggTest.java index 3012f15afb..836c527685 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/ListaggTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/ListaggTest.java @@ -16,8 +16,8 @@ import org.junit.Test; import org.junit.experimental.categories.Category; -import javax.persistence.EntityManager; -import javax.persistence.Tuple; +import jakarta.persistence.EntityManager; +import jakarta.persistence.Tuple; import static org.junit.Assert.assertEquals; diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/MultipleJoinComplexExpressionTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/MultipleJoinComplexExpressionTest.java index 4248d7db4a..c42f071192 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/MultipleJoinComplexExpressionTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/MultipleJoinComplexExpressionTest.java @@ -9,7 +9,7 @@ import java.util.Locale; -import javax.persistence.Tuple; +import jakarta.persistence.Tuple; import com.blazebit.persistence.testsuite.base.jpa.category.NoEclipselink; import org.junit.Test; diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/MultipleJoinTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/MultipleJoinTest.java index 37d933fc4e..4288fc35e8 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/MultipleJoinTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/MultipleJoinTest.java @@ -9,7 +9,7 @@ import java.util.Locale; -import javax.persistence.Tuple; +import jakarta.persistence.Tuple; import org.junit.Test; diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/NonPrimaryKeyJoinColumnTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/NonPrimaryKeyJoinColumnTest.java index 818c17d7a1..4a934d9099 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/NonPrimaryKeyJoinColumnTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/NonPrimaryKeyJoinColumnTest.java @@ -7,16 +7,7 @@ import com.blazebit.persistence.CriteriaBuilder; import com.blazebit.persistence.UpdateCriteriaBuilder; -import com.blazebit.persistence.testsuite.base.jpa.category.NoDatanucleus; import com.blazebit.persistence.testsuite.base.jpa.category.NoEclipselink; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate42; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate43; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate50; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate51; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate52; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate53; -import com.blazebit.persistence.testsuite.base.jpa.category.NoOpenJPA; import com.blazebit.persistence.testsuite.entity.BookEntity; import com.blazebit.persistence.testsuite.entity.BookISBNReferenceEntity; import com.blazebit.persistence.testsuite.entity.Document; @@ -28,7 +19,7 @@ import org.junit.Test; import org.junit.experimental.categories.Category; -import javax.persistence.Tuple; +import jakarta.persistence.Tuple; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; @@ -58,7 +49,7 @@ protected Class[] getEntityClasses() { @Test // NOTE: Only Hibernate supports the single values association id access optimization, but doesn't do it for natural ids yet - @Category({ NoHibernate42.class, NoHibernate43.class, NoHibernate50.class, NoHibernate51.class, NoHibernate52.class, NoHibernate53.class, NoEclipselink.class, NoDatanucleus.class, NoOpenJPA.class}) + @Category({NoEclipselink.class}) // @Category({ NoDatanucleus.class, NoOpenJPA.class }) public void testNonPrimaryKeySingleValuedAssociationId() { CriteriaBuilder cb = cbf.create(em, Tuple.class).from(BookISBNReferenceEntity.class, "ref") @@ -71,7 +62,7 @@ public void testNonPrimaryKeySingleValuedAssociationId() { @Test // NOTE: Only Hibernate supports the single values association id access optimization, but doesn't do it for natural ids yet - @Category({ NoHibernate42.class, NoHibernate43.class, NoHibernate50.class, NoHibernate51.class, NoHibernate52.class, NoHibernate53.class, NoEclipselink.class, NoDatanucleus.class, NoOpenJPA.class}) + @Category({NoEclipselink.class}) // @Category({ NoDatanucleus.class, NoOpenJPA.class }) public void testNonPrimaryKeySingleValuedAssociationId2() { CriteriaBuilder cb = cbf.create(em, Tuple.class).from(BookISBNReferenceEntity.class) @@ -83,7 +74,6 @@ public void testNonPrimaryKeySingleValuedAssociationId2() { } @Test - @Category({ NoDatanucleus.class, NoOpenJPA.class }) public void testNonPrimaryKeySingleValuedAssociationId3() { CriteriaBuilder cb = cbf.create(em, Tuple.class).from(BookISBNReferenceEntity.class) .innerJoin("book", "b") @@ -95,7 +85,6 @@ public void testNonPrimaryKeySingleValuedAssociationId3() { } @Test - @Category({ NoDatanucleus.class, NoOpenJPA.class }) public void testNonPrimaryKeySingleValuedAssociationId4() { CriteriaBuilder cb = cbf.create(em, Tuple.class).from(BookISBNReferenceEntity.class, "r") .innerJoinOn("book", "b") @@ -110,7 +99,7 @@ public void testNonPrimaryKeySingleValuedAssociationId4() { // NOTE: No JPA provider supports the optimized natural id access and only EclipseLink and Hibernate seem to support natural ids @Test - @Category({ NoHibernate42.class, NoHibernate43.class, NoHibernate50.class, NoHibernate51.class, NoHibernate52.class, NoHibernate53.class, NoEclipselink.class, NoDatanucleus.class, NoOpenJPA.class}) + @Category({NoEclipselink.class}) public void testNonPrimaryKeySingleValuedAssociationId5() { CriteriaBuilder cb1 = cbf.create(em, Tuple.class).from(BookISBNReferenceEntity.class, "r") .innerJoinOn("bookNormal", "b") @@ -132,7 +121,7 @@ public void testNonPrimaryKeySingleValuedAssociationId5() { // NOTE: No JPA provider supports the optimized natural id access and only EclipseLink and Hibernate seem to support natural ids @Test - @Category({ NoHibernate42.class, NoHibernate43.class, NoHibernate50.class, NoHibernate51.class, NoHibernate52.class, NoHibernate53.class, NoEclipselink.class, NoDatanucleus.class, NoOpenJPA.class}) + @Category({NoEclipselink.class}) public void testNonPrimaryKeySingleValuedAssociationIdInUpdate() { Person owner = new Person("p1"); BookEntity bookEntity = new BookEntity(); diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/OptimizedKeysetPaginationNullsTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/OptimizedKeysetPaginationNullsTest.java index c6f87af488..82e2bc0e38 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/OptimizedKeysetPaginationNullsTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/OptimizedKeysetPaginationNullsTest.java @@ -5,21 +5,6 @@ package com.blazebit.persistence.testsuite; -import com.blazebit.persistence.CriteriaBuilder; -import com.blazebit.persistence.PagedList; -import com.blazebit.persistence.PaginatedCriteriaBuilder; -import com.blazebit.persistence.ConfigurationProperties; -import com.blazebit.persistence.spi.CriteriaBuilderConfiguration; -import com.blazebit.persistence.testsuite.base.jpa.category.NoDatanucleus; -import com.blazebit.persistence.testsuite.entity.KeysetEntity2; -import com.blazebit.persistence.testsuite.tx.TxVoidWork; -import org.junit.Test; -import org.junit.experimental.categories.Category; -import org.junit.runner.RunWith; -import org.junit.runners.Parameterized; - -import javax.persistence.EntityManager; -import javax.persistence.Tuple; import java.io.Serializable; import java.util.ArrayList; import java.util.Collection; @@ -28,6 +13,20 @@ import java.util.Map; import java.util.regex.Pattern; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; + +import com.blazebit.persistence.ConfigurationProperties; +import com.blazebit.persistence.CriteriaBuilder; +import com.blazebit.persistence.PagedList; +import com.blazebit.persistence.PaginatedCriteriaBuilder; +import com.blazebit.persistence.spi.CriteriaBuilderConfiguration; +import com.blazebit.persistence.testsuite.entity.KeysetEntity2; +import com.blazebit.persistence.testsuite.tx.TxVoidWork; +import jakarta.persistence.EntityManager; +import jakarta.persistence.Tuple; + import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; @@ -36,9 +35,6 @@ * @author Moritz Becker * @since 1.2.0 */ -// DataNucleus has a bug with null precedence rendering -// see https://github.com/datanucleus/datanucleus-rdbms/issues/224 -@Category({ NoDatanucleus.class }) @RunWith(Parameterized.class) public class OptimizedKeysetPaginationNullsTest extends AbstractCoreTest { diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/OptimizedKeysetPaginationPage1EdgeCaseFallbackTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/OptimizedKeysetPaginationPage1EdgeCaseFallbackTest.java index 871811c9b9..6b54f667a8 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/OptimizedKeysetPaginationPage1EdgeCaseFallbackTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/OptimizedKeysetPaginationPage1EdgeCaseFallbackTest.java @@ -19,8 +19,8 @@ import com.blazebit.persistence.testsuite.tx.TxVoidWork; import org.junit.Test; -import javax.persistence.EntityManager; -import javax.persistence.Tuple; +import jakarta.persistence.EntityManager; +import jakarta.persistence.Tuple; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/OptimizedKeysetPaginationRowValueConstructorTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/OptimizedKeysetPaginationRowValueConstructorTest.java index 52f6648d04..03bdb73977 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/OptimizedKeysetPaginationRowValueConstructorTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/OptimizedKeysetPaginationRowValueConstructorTest.java @@ -22,8 +22,8 @@ import org.junit.Test; import org.junit.experimental.categories.Category; -import javax.persistence.EntityManager; -import javax.persistence.Tuple; +import jakarta.persistence.EntityManager; +import jakarta.persistence.Tuple; import java.util.List; import static org.junit.Assert.assertEquals; diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/OptimizedKeysetPaginationTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/OptimizedKeysetPaginationTest.java index 10bc9c4266..f854f837a2 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/OptimizedKeysetPaginationTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/OptimizedKeysetPaginationTest.java @@ -24,8 +24,8 @@ import org.junit.Test; import org.junit.experimental.categories.Category; -import javax.persistence.EntityManager; -import javax.persistence.Tuple; +import jakarta.persistence.EntityManager; +import jakarta.persistence.Tuple; import java.util.List; import static org.junit.Assert.assertEquals; diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/OrderByTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/OrderByTest.java index f7ef71e16e..f51a35cbed 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/OrderByTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/OrderByTest.java @@ -5,24 +5,21 @@ package com.blazebit.persistence.testsuite; -import static org.junit.Assert.assertEquals; - -import com.blazebit.persistence.CriteriaBuilderFactory; -import com.blazebit.persistence.testsuite.base.jpa.category.NoDatanucleus; -import com.blazebit.persistence.testsuite.entity.Person; import org.junit.Assert; import org.junit.Test; +import com.blazebit.persistence.ConfigurationProperties; import com.blazebit.persistence.Criteria; import com.blazebit.persistence.CriteriaBuilder; +import com.blazebit.persistence.CriteriaBuilderFactory; import com.blazebit.persistence.PaginatedCriteriaBuilder; -import com.blazebit.persistence.ConfigurationProperties; import com.blazebit.persistence.parser.expression.SyntaxErrorException; import com.blazebit.persistence.spi.CriteriaBuilderConfiguration; import com.blazebit.persistence.testsuite.entity.Document; -import org.junit.experimental.categories.Category; +import com.blazebit.persistence.testsuite.entity.Person; +import jakarta.persistence.Tuple; -import javax.persistence.Tuple; +import static org.junit.Assert.assertEquals; /** * @@ -171,8 +168,6 @@ public void testOrderByFunctionExpression() { } @Test - // TODO: Report datanucleus issue - @Category({ NoDatanucleus.class }) public void testOrderByAliasedCaseWhen() { CriteriaBuilder criteria = cbf.create(em, Document.class, "d"); diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/PaginationEmbeddedIdTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/PaginationEmbeddedIdTest.java index ff8b10fd70..bd1a998cb6 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/PaginationEmbeddedIdTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/PaginationEmbeddedIdTest.java @@ -5,21 +5,23 @@ package com.blazebit.persistence.testsuite; +import org.junit.Test; +import org.junit.experimental.categories.Category; + import com.blazebit.persistence.CriteriaBuilder; import com.blazebit.persistence.PagedList; import com.blazebit.persistence.PaginatedCriteriaBuilder; -import com.blazebit.persistence.testsuite.base.jpa.category.NoDatanucleus; import com.blazebit.persistence.testsuite.base.jpa.category.NoEclipselink; import com.blazebit.persistence.testsuite.base.jpa.category.NoMSSQL; -import com.blazebit.persistence.testsuite.base.jpa.category.NoOpenJPA; import com.blazebit.persistence.testsuite.base.jpa.category.NoOracle; -import com.blazebit.persistence.testsuite.entity.*; +import com.blazebit.persistence.testsuite.entity.EmbeddableTestEntity; +import com.blazebit.persistence.testsuite.entity.EmbeddableTestEntityContainer; +import com.blazebit.persistence.testsuite.entity.EmbeddableTestEntitySub; +import com.blazebit.persistence.testsuite.entity.IntIdEntity; +import com.blazebit.persistence.testsuite.entity.NameObject; import com.blazebit.persistence.testsuite.tx.TxVoidWork; -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import javax.persistence.EntityManager; -import javax.persistence.Tuple; +import jakarta.persistence.EntityManager; +import jakarta.persistence.Tuple; import static org.junit.Assert.assertEquals; @@ -29,8 +31,7 @@ * @since 1.2.0 */ // NOTE: EclipseLink doesn't support Map in embeddables: https://bugs.eclipse.org/bugs/show_bug.cgi?id=391062 -// TODO: report that datanucleus doesn't support element collection in an embeddable -@Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) +@Category({ NoEclipselink.class }) public class PaginationEmbeddedIdTest extends AbstractCoreTest { @Override diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/PaginationOneToOneTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/PaginationOneToOneTest.java index 9891c5004c..d865aa8b5f 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/PaginationOneToOneTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/PaginationOneToOneTest.java @@ -14,8 +14,8 @@ import com.blazebit.persistence.testsuite.tx.TxVoidWork; import org.junit.Test; -import javax.persistence.EntityManager; -import javax.persistence.Tuple; +import jakarta.persistence.EntityManager; +import jakarta.persistence.Tuple; import static org.junit.Assert.assertEquals; diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/PaginationTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/PaginationTest.java index 33bb172925..e7b0d53fd7 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/PaginationTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/PaginationTest.java @@ -5,36 +5,35 @@ package com.blazebit.persistence.testsuite; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; +import java.util.Locale; + +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; +import org.junit.experimental.categories.Category; + import com.blazebit.persistence.ConfigurationProperties; import com.blazebit.persistence.CriteriaBuilder; import com.blazebit.persistence.DefaultKeyset; import com.blazebit.persistence.DefaultKeysetPage; import com.blazebit.persistence.PagedList; import com.blazebit.persistence.PaginatedCriteriaBuilder; -import com.blazebit.persistence.testsuite.base.jpa.category.NoDatanucleus; import com.blazebit.persistence.testsuite.base.jpa.category.NoEclipselink; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate42; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate43; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate50; -import com.blazebit.persistence.testsuite.base.jpa.category.NoOpenJPA; +import com.blazebit.persistence.testsuite.base.jpa.category.NoMySQL; import com.blazebit.persistence.testsuite.entity.Document; import com.blazebit.persistence.testsuite.entity.Person; import com.blazebit.persistence.testsuite.entity.Workflow; import com.blazebit.persistence.testsuite.model.DocumentViewModel; import com.blazebit.persistence.testsuite.tx.TxVoidWork; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import javax.persistence.EntityManager; -import javax.persistence.Tuple; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.List; -import java.util.Locale; +import jakarta.persistence.EntityManager; +import jakarta.persistence.Tuple; -import static org.junit.Assert.*; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; /** * @@ -383,8 +382,6 @@ public void testPaginationWithNotExistingReferenceObject() { } @Test - // Apparently, Datanucleus doesn't like it when using a joined element collection in a function - @Category(NoDatanucleus.class) public void testPaginatedWithGroupByExplicitPagination() { String expectedCountQuery = "SELECT " + countPaginated("d.id", false) + " FROM Document d"; String expectedIdQuery = "SELECT d.id FROM Document d GROUP BY " + groupBy("d.id") + " ORDER BY d.id ASC"; @@ -409,8 +406,6 @@ public void testPaginatedWithGroupByExplicitPagination() { } @Test - // Apparently, Datanucleus doesn't like it when using a joined element collection in a function - @Category(NoDatanucleus.class) public void testPaginatedWithGroupBy1() { String expectedCountQuery = "SELECT " + countPaginated("d.id, "+ "strings_1", true) + " FROM Document d LEFT JOIN d.strings strings_1"; String expectedIdQuery = "SELECT d.id, strings_1 FROM Document d LEFT JOIN d.strings strings_1 GROUP BY " + groupBy("d.id", "strings_1") + " ORDER BY d.id ASC"; @@ -435,8 +430,6 @@ public void testPaginatedWithGroupBy1() { } @Test - // Apparently, Datanucleus doesn't like it when using a joined element collection in a function - @Category(NoDatanucleus.class) public void testPaginatedWithGroupBy2() { String expectedCountQuery = "SELECT " + countPaginated("d.id, " + "strings_1", true) + " FROM Document d LEFT JOIN d.strings strings_1"; String expectedIdQuery = "SELECT d.id, strings_1 FROM Document d LEFT JOIN d.strings strings_1 GROUP BY " + groupBy("d.id", "strings_1") + " ORDER BY d.id ASC"; @@ -464,8 +457,6 @@ public void testPaginatedWithGroupBy2() { } @Test - // Apparently, Datanucleus doesn't like it when using a joined element collection in a function - @Category(NoDatanucleus.class) public void testPaginatedWithGroupBy3() { String expectedCountQuery = "SELECT " + countPaginated("d.id, " + "strings_1", true) + " FROM Document d LEFT JOIN d.strings strings_1"; String expectedIdQuery = "SELECT d.id, strings_1 FROM Document d LEFT JOIN d.strings strings_1 GROUP BY " + groupBy("d.id", "strings_1") + " ORDER BY d.id ASC"; @@ -493,8 +484,6 @@ public void testPaginatedWithGroupBy3() { } @Test - // Apparently, Datanucleus doesn't like it when using a joined element collection in a function - @Category(NoDatanucleus.class) public void testPaginatedWithGroupBy4() { String expectedCountQuery = "SELECT " + countPaginated("d.id, " + "strings_1", true) + " FROM Document d LEFT JOIN d.strings strings_1"; String expectedIdQuery = "SELECT d.id, strings_1 FROM Document d LEFT JOIN d.strings strings_1 GROUP BY " + groupBy("d.id", "strings_1") + " ORDER BY d.id ASC"; @@ -522,8 +511,6 @@ public void testPaginatedWithGroupBy4() { } @Test - // Apparently, Datanucleus doesn't like it when using a joined element collection in a function - @Category(NoDatanucleus.class) public void testPaginatedWithGroupBy5() { String expectedCountQuery = "SELECT " + countPaginated("d.id, "+ "strings_1", true) + " FROM Document d LEFT JOIN d.strings strings_1"; String expectedIdQuery = "SELECT d.id, strings_1 FROM Document d LEFT JOIN d.strings strings_1 GROUP BY " + groupBy("d.id", "d.name", "strings_1") + " ORDER BY d.name ASC, d.id ASC"; @@ -551,9 +538,8 @@ public void testPaginatedWithGroupBy5() { } @Test - // Apparently, Datanucleus doesn't like it when using a joined element collection in a function // Eclipselink does not render the table alias necessary for the path expression in the count function... - @Category({ NoEclipselink.class, NoDatanucleus.class }) + @Category({ NoEclipselink.class }) public void testPaginatedWithGroupBy6() { String expectedCountQuery = "SELECT " + countPaginated("d.name, " + "strings_1", true) + " FROM Document d LEFT JOIN d.strings strings_1"; String expectedIdQuery = "SELECT d.name, strings_1 FROM Document d LEFT JOIN d.strings strings_1 GROUP BY " + groupBy("d.name", "strings_1", renderNullPrecedenceGroupBy("strings_1", "ASC", "LAST")) + " ORDER BY d.name ASC, " + renderNullPrecedence("strings_1", "ASC", "LAST"); @@ -581,9 +567,8 @@ public void testPaginatedWithGroupBy6() { } @Test - // Apparently, Datanucleus doesn't like it when using a joined element collection in a function // Eclipselink does not render the table alias necessary for the path expression in the count function... - @Category({ NoEclipselink.class, NoDatanucleus.class }) + @Category({ NoEclipselink.class }) public void testPaginatedWithGroupBy7() { String expectedCountQuery = "SELECT " + countPaginated("d.name, d.age, " + "strings_1", true) + " FROM Document d LEFT JOIN d.strings strings_1"; String expectedIdQuery = "SELECT d.name, d.age, strings_1 FROM Document d LEFT JOIN d.strings strings_1 GROUP BY " + groupBy("d.name", "strings_1", "d.age", renderNullPrecedenceGroupBy("strings_1", "ASC", "LAST")) + " ORDER BY d.name ASC, d.age ASC, " + renderNullPrecedence("strings_1", "ASC", "LAST"); @@ -611,9 +596,8 @@ public void testPaginatedWithGroupBy7() { } @Test - // Apparently, Datanucleus doesn't like it when using a joined element collection in a function // Eclipselink does not render the table alias necessary for the path expression in the count function... - @Category({ NoEclipselink.class, NoDatanucleus.class }) + @Category({ NoEclipselink.class }) public void testPaginatedWithGroupBy8() { String expectedCountQuery = "SELECT " + countPaginated("d.id", false) + " FROM Document d"; String expectedIdQuery = "SELECT d.id FROM Document d GROUP BY " + groupBy("d.id", "d.name", "d.age") + " ORDER BY d.name ASC, d.age ASC, d.id ASC"; @@ -645,9 +629,8 @@ public void testPaginatedWithGroupBy8() { } @Test - // Apparently, Datanucleus doesn't like it when using a joined element collection in a function // Eclipselink does not render the table alias necessary for the path expression in the count function... - @Category({ NoEclipselink.class, NoDatanucleus.class }) + @Category({ NoEclipselink.class }) public void testPaginatedWithGroupBy9() { String expectedCountQuery = "SELECT " + countPaginated("d.id", false) + " FROM Document d"; String expectedIdQuery = "SELECT d.id FROM Document d GROUP BY " + groupBy("d.id") + " ORDER BY d.id ASC"; @@ -867,8 +850,6 @@ public void testOrderBySizeAlias() { } @Test - // Apparently, Datanucleus doesn't like it when using a joined element collection in a function - @Category(NoDatanucleus.class) public void testOrderBySizeAlias2() { PaginatedCriteriaBuilder cb = cbf.create(em, Tuple.class).from(Document.class, "d") .select("SIZE(d.contacts)", "contactCount") @@ -930,7 +911,7 @@ public void testSelectOnlyPropagationForWithJoins2() { @Test // Not sure what datanucleus does here.. - @Category({ NoEclipselink.class, NoDatanucleus.class }) + @Category({ NoEclipselink.class }) // TODO: report eclipse bug, the expression "VALUE(c) IS NULL" seems illegal but JPA spec 4.6.11 allows it public void testSelectOnlyPropagationForWithJoins3() { CriteriaBuilder cb = cbf.create(em, Tuple.class).from(Document.class, "d"); @@ -952,7 +933,7 @@ public void testSelectOnlyPropagationForWithJoins3() { @Test // NOTE: Entity joins are supported since Hibernate 5.1, Datanucleus 5 and latest Eclipselink - @Category({NoHibernate42.class, NoHibernate43.class, NoHibernate50.class, NoEclipselink.class, NoDatanucleus.class }) + @Category({ NoEclipselink.class }) public void testCountWithExplicitLeftJoin() { CriteriaBuilder cb = cbf.create(em, Tuple.class).from(Document.class, "d") .leftJoinOn(Person.class, "p") @@ -966,7 +947,7 @@ public void testCountWithExplicitLeftJoin() { } @Test - @Category({ NoEclipselink.class, NoDatanucleus.class }) + @Category({ NoEclipselink.class }) public void testPaginateSimpleAggregate() { CriteriaBuilder cb = cbf.create(em, Tuple.class) .from(Document.class, "d") @@ -1173,8 +1154,9 @@ public void testOrderBySingleValuesAssociationId() { } @Test - @Category(NoEclipselink.class) + // MySQL doesn't support limit in subquery of IN predicate // TODO: report eclipselink does not support subqueries in functions + @Category({ NoMySQL.class, NoEclipselink.class }) public void testExtractIdQueryIntoSubquery() { CriteriaBuilder cb = cbf.create(em, Document.class) .from(Document.class, "doc") @@ -1192,7 +1174,7 @@ public void testExtractIdQueryIntoSubquery() { } @Test - @Category({ NoEclipselink.class, NoDatanucleus.class, NoOpenJPA.class }) + @Category({ NoEclipselink.class }) // TODO: report eclipselink does not support subqueries in functions public void testBoundedCountSimpleExternal() { PaginatedCriteriaBuilder cb = cbf.create(em, Document.class, "d") @@ -1208,7 +1190,7 @@ public void testBoundedCountSimpleExternal() { } @Test - @Category({ NoEclipselink.class, NoDatanucleus.class, NoOpenJPA.class }) + @Category({ NoEclipselink.class }) // TODO: report eclipselink does not support subqueries in functions public void testBoundedCountSimpleInline() { PaginatedCriteriaBuilder cb = cbf.create(em, Document.class, "d") @@ -1223,7 +1205,7 @@ public void testBoundedCountSimpleInline() { } @Test - @Category({ NoEclipselink.class, NoDatanucleus.class, NoOpenJPA.class }) + @Category({ NoEclipselink.class }) // TODO: report eclipselink does not support subqueries in functions public void testBoundedCountAdvancedExternal() { PaginatedCriteriaBuilder cb = cbf.create(em, Document.class, "d") @@ -1241,7 +1223,7 @@ public void testBoundedCountAdvancedExternal() { } @Test - @Category({ NoEclipselink.class, NoDatanucleus.class, NoOpenJPA.class }) + @Category({ NoEclipselink.class }) // TODO: report eclipselink does not support subqueries in functions public void testBoundedCountAdvancedInline() { PaginatedCriteriaBuilder cb = cbf.create(em, Document.class, "d") @@ -1258,9 +1240,7 @@ public void testBoundedCountAdvancedInline() { } // Test for #1209 - // NOTE: DataNucleus renders the literal `(1)` for the byte array parameter on PostgreSQL which is wrong @Test - @Category({ NoDatanucleus.class }) public void testPaginationImplicitGroupByWithParameter() { PaginatedCriteriaBuilder cb = cbf.create(em, Tuple.class) .from(Document.class, "d") @@ -1273,8 +1253,7 @@ public void testPaginationImplicitGroupByWithParameter() { } @Test - // NOTE: Entity joins are supported since Hibernate 5.1, Datanucleus 5 and latest Eclipselink - @Category({NoHibernate42.class, NoHibernate43.class, NoHibernate50.class, NoEclipselink.class, NoDatanucleus.class }) + @Category({ NoEclipselink.class }) public void testUsePaginatedCriteriaBuilderCopyAsSubquery() { CriteriaBuilder cb = cbf.create(em, Tuple.class) .from(Document.class, "d") diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/ParameterAPITest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/ParameterAPITest.java index df24a1b412..d8dcad7efb 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/ParameterAPITest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/ParameterAPITest.java @@ -11,9 +11,9 @@ import org.junit.Assert; import org.junit.Test; -import javax.persistence.Parameter; -import javax.persistence.TemporalType; -import javax.persistence.Tuple; +import jakarta.persistence.Parameter; +import jakarta.persistence.TemporalType; +import jakarta.persistence.Tuple; import java.util.Calendar; import java.util.Date; import java.util.Set; diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/PolymorphicJoinTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/PolymorphicJoinTest.java index 760ac8dbb7..eb9a02e3eb 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/PolymorphicJoinTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/PolymorphicJoinTest.java @@ -7,10 +7,11 @@ import static org.junit.Assert.assertTrue; -import javax.persistence.Tuple; +import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate; +import jakarta.persistence.Tuple; import com.blazebit.persistence.testsuite.base.jpa.category.NoEclipselink; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate60; +import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate62; import com.blazebit.persistence.testsuite.entity.PolymorphicBaseContainer; import org.junit.Test; @@ -28,7 +29,7 @@ * @since 1.0.0 */ // NOTE: Hibernate 6.0 supports this when only a single subtype contains the attribute -@Category(NoHibernate60.class) +@Category(NoHibernate.class) public class PolymorphicJoinTest extends AbstractCoreTest { @Override diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/PolymorphicPropertyTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/PolymorphicPropertyTest.java index d3d56a6e11..067599cd89 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/PolymorphicPropertyTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/PolymorphicPropertyTest.java @@ -6,7 +6,8 @@ package com.blazebit.persistence.testsuite; import com.blazebit.persistence.CriteriaBuilder; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate60; +import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate; +import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate62; import com.blazebit.persistence.testsuite.entity.IntIdEntity; import com.blazebit.persistence.testsuite.entity.PolymorphicBase; import com.blazebit.persistence.testsuite.entity.PolymorphicBaseContainer; @@ -27,7 +28,7 @@ * @since 1.0.0 */ // NOTE: Hibernate 6.0 supports this when only a single subtype contains the attribute -@Category(NoHibernate60.class) +@Category(NoHibernate.class) public class PolymorphicPropertyTest extends AbstractCoreTest { @Override diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/QueryResultCachingTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/QueryResultCachingTest.java index 51f50146f8..b2a8bbe66e 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/QueryResultCachingTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/QueryResultCachingTest.java @@ -5,20 +5,17 @@ package com.blazebit.persistence.testsuite; -import com.blazebit.persistence.testsuite.base.jpa.category.NoDatanucleus; -import com.blazebit.persistence.testsuite.base.jpa.category.NoEclipselink; -import com.blazebit.persistence.testsuite.base.jpa.category.NoOpenJPA; -import com.blazebit.persistence.testsuite.entity.Document; -import com.blazebit.persistence.testsuite.entity.Person; +import java.util.Properties; + import org.junit.After; -import org.junit.Assert; import org.junit.Before; import org.junit.Test; import org.junit.experimental.categories.Category; -import javax.persistence.TypedQuery; -import java.util.List; -import java.util.Properties; +import com.blazebit.persistence.testsuite.base.jpa.category.NoEclipselink; +import com.blazebit.persistence.testsuite.entity.Document; +import com.blazebit.persistence.testsuite.entity.Person; +import jakarta.persistence.TypedQuery; /** * @author Christian Beikov @@ -60,7 +57,7 @@ public final void tearDown() { // Apparently, only Hibernate is able to cache scalar queries... @Test - @Category({ NoEclipselink.class, NoDatanucleus.class, NoOpenJPA.class }) + @Category({ NoEclipselink.class }) public void queryResultCachingTest() { TypedQuery query = cbf.create(em, String.class) .from(Document.class) @@ -80,7 +77,7 @@ public void queryResultCachingTest() { // Apparently, only Hibernate is able to cache scalar queries... @Test - @Category({ NoEclipselink.class, NoDatanucleus.class, NoOpenJPA.class }) + @Category({ NoEclipselink.class }) public void queryResultCachingWithObjectBuilderTest() { TypedQuery query = cbf.create(em, String.class) .from(Document.class) diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/RawTypesTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/RawTypesTest.java index 50620e9844..36d680f8e6 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/RawTypesTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/RawTypesTest.java @@ -5,11 +5,10 @@ package com.blazebit.persistence.testsuite; +import org.junit.Test; + import com.blazebit.persistence.CriteriaBuilder; -import com.blazebit.persistence.testsuite.base.jpa.category.NoDatanucleus; import com.blazebit.persistence.testsuite.entity.RawTypeEntity; -import org.junit.Test; -import org.junit.experimental.categories.Category; /** * This test is for issue #344 @@ -26,9 +25,7 @@ protected Class[] getEntityClasses() { }; } - // NOTE: Datanucleus does not support the MapKeyClass yet: https://github.com/datanucleus/datanucleus-core/issues/185 @Test - @Category({ NoDatanucleus.class }) public void buildingQueryWithEntityThatUsesRawTypesWorks() { CriteriaBuilder criteria = cbf.create(em, RawTypeEntity.class, "d"); criteria.select("d.list.id"); diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/SecondaryTableTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/SecondaryTableTest.java index 970acacd11..094a8a9d98 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/SecondaryTableTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/SecondaryTableTest.java @@ -5,13 +5,14 @@ package com.blazebit.persistence.testsuite; +import org.junit.Test; +import org.junit.experimental.categories.Category; + import com.blazebit.persistence.CriteriaBuilder; import com.blazebit.persistence.UpdateCriteriaBuilder; -import com.blazebit.persistence.testsuite.base.jpa.category.NoDatanucleus; +import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate; import com.blazebit.persistence.testsuite.entity.SecondaryTableEntityBase; import com.blazebit.persistence.testsuite.entity.SecondaryTableEntitySub; -import org.junit.Test; -import org.junit.experimental.categories.Category; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; @@ -37,9 +38,9 @@ public void secondaryTableWithJoinedInheritanceTest() { assertFalse(criteria.getResultList().isEmpty()); } + // NOTE: Hibernate ORM bug: https://hibernate.atlassian.net/browse/HHH-18813 @Test - // DataNucleus doesn't handle that properly - @Category({ NoDatanucleus.class }) + @Category({ NoHibernate.class } ) public void updateSecondaryTableAttribute() { SecondaryTableEntitySub b = new SecondaryTableEntitySub(); b.setB(4L); diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/SelectNewObjectBuilderTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/SelectNewObjectBuilderTest.java index 4de275b4d0..23a101288f 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/SelectNewObjectBuilderTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/SelectNewObjectBuilderTest.java @@ -14,7 +14,7 @@ import com.blazebit.persistence.testsuite.tx.TxVoidWork; import org.junit.Test; -import javax.persistence.EntityManager; +import jakarta.persistence.EntityManager; import java.util.List; import static org.junit.Assert.assertArrayEquals; diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/SelectNewTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/SelectNewTest.java index f34cf3b541..9f67da5648 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/SelectNewTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/SelectNewTest.java @@ -15,7 +15,7 @@ import com.blazebit.persistence.testsuite.tx.TxVoidWork; import org.junit.Test; -import javax.persistence.EntityManager; +import jakarta.persistence.EntityManager; import java.lang.reflect.Constructor; import java.util.List; diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/SelectPolymorphicTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/SelectPolymorphicTest.java index aaa6db5363..50967a88fb 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/SelectPolymorphicTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/SelectPolymorphicTest.java @@ -5,22 +5,20 @@ package com.blazebit.persistence.testsuite; +import java.util.List; + +import org.junit.Assert; +import org.junit.Test; +import org.junit.experimental.categories.Category; + import com.blazebit.persistence.CriteriaBuilder; -import com.blazebit.persistence.testsuite.base.jpa.category.NoDatanucleus; import com.blazebit.persistence.testsuite.base.jpa.category.NoEclipselink; -import com.blazebit.persistence.testsuite.base.jpa.category.NoMySQLOld; -import com.blazebit.persistence.testsuite.base.jpa.category.NoOpenJPA; import com.blazebit.persistence.testsuite.entity.IdHolderCTE; import com.blazebit.persistence.testsuite.entity.TPCBase; import com.blazebit.persistence.testsuite.entity.TPCSub1; import com.blazebit.persistence.testsuite.entity.TPCSub2; import com.blazebit.persistence.testsuite.tx.TxVoidWork; -import org.junit.Assert; -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import javax.persistence.EntityManager; -import java.util.List; +import jakarta.persistence.EntityManager; import static org.junit.Assert.assertEquals; @@ -54,9 +52,8 @@ public void work(EntityManager em) { }); } - // NOTE: MySQL has no CTE support @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class, NoMySQLOld.class }) + @Category({ NoEclipselink.class }) public void testSelectTablePerClassWithCte() throws Exception { CriteriaBuilder cb = cbf.create(em, TPCBase.class, "t") .with(IdHolderCTE.class, false) diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/SelectTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/SelectTest.java index 2a03976466..67a941d2b9 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/SelectTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/SelectTest.java @@ -10,8 +10,8 @@ import java.util.Calendar; import java.util.List; -import javax.persistence.EntityManager; -import javax.persistence.Tuple; +import jakarta.persistence.EntityManager; +import jakarta.persistence.Tuple; import com.blazebit.persistence.testsuite.entity.DocumentType; import com.blazebit.persistence.testsuite.tx.TxVoidWork; diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/SetOperationTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/SetOperationTest.java index 245d98ad93..6851cde109 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/SetOperationTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/SetOperationTest.java @@ -5,12 +5,11 @@ package com.blazebit.persistence.testsuite; -import static org.junit.Assert.assertEquals; - import java.util.List; -import javax.persistence.EntityManager; -import javax.persistence.Tuple; +import org.junit.Before; +import org.junit.Test; +import org.junit.experimental.categories.Category; import com.blazebit.persistence.CriteriaBuilder; import com.blazebit.persistence.FinalSetOperationCriteriaBuilder; @@ -21,19 +20,17 @@ import com.blazebit.persistence.StartOngoingSetOperationCriteriaBuilder; import com.blazebit.persistence.impl.BuilderChainingException; import com.blazebit.persistence.spi.SetOperationType; -import com.blazebit.persistence.testsuite.entity.*; -import com.blazebit.persistence.testsuite.tx.TxVoidWork; -import org.junit.Before; -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import com.blazebit.persistence.testsuite.base.jpa.category.NoDatanucleus; import com.blazebit.persistence.testsuite.base.jpa.category.NoEclipselink; -import com.blazebit.persistence.testsuite.base.jpa.category.NoFirebird; import com.blazebit.persistence.testsuite.base.jpa.category.NoH2; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate42; import com.blazebit.persistence.testsuite.base.jpa.category.NoMySQL; -import com.blazebit.persistence.testsuite.base.jpa.category.NoOpenJPA; +import com.blazebit.persistence.testsuite.entity.Document; +import com.blazebit.persistence.testsuite.entity.IdHolderCTE; +import com.blazebit.persistence.testsuite.entity.Person; +import com.blazebit.persistence.testsuite.tx.TxVoidWork; +import jakarta.persistence.EntityManager; +import jakarta.persistence.Tuple; + +import static org.junit.Assert.assertEquals; /** * Firebird like MySQL do not support intersect and except operators. @@ -87,7 +84,7 @@ public void setUp() { } @Test - @Category({ NoMySQL.class, NoFirebird.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoMySQL.class, NoEclipselink.class }) public void testPrecedence() { FinalSetOperationCriteriaBuilder cb = cbf.create(em, String.class) .from(Document.class, "d1") @@ -116,7 +113,7 @@ public void testPrecedence() { } @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoEclipselink.class }) public void testObjectBuilder() { FinalSetOperationCriteriaBuilder cb = cbf.create(em, Tuple.class) .from(Document.class, "d1") @@ -142,7 +139,7 @@ public void testObjectBuilder() { } @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoEclipselink.class }) public void testUnionAll() { FinalSetOperationCriteriaBuilder cb = cbf.create(em, String.class) .from(Document.class, "d1") @@ -166,7 +163,7 @@ public void testUnionAll() { } @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoEclipselink.class }) public void testUnionAllOrderBy() { FinalSetOperationCriteriaBuilder cb = cbf .create(em, Document.class, "d1") @@ -192,7 +189,7 @@ public void testUnionAllOrderBy() { } @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoEclipselink.class }) public void testUnionAllOrderBySubqueryLimit() { CriteriaBuilder cb = cbf .create(em, Document.class, "d") @@ -226,7 +223,7 @@ public void testUnionAllOrderBySubqueryLimit() { } @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoEclipselink.class }) public void testUnionAllOrderByOperandLimit() { FinalSetOperationCriteriaBuilder cb = cbf .create(em, Document.class) @@ -255,7 +252,7 @@ public void testUnionAllOrderByOperandLimit() { } @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoEclipselink.class }) public void testUnion() { FinalSetOperationCriteriaBuilder cb = cbf .create(em, Document.class, "d1") @@ -278,9 +275,8 @@ public void testUnion() { } @Test - // TODO: why no hibernate 4.2? // NOTE: H2 does not support the PARTITION clause in the ROW_NUMBER function, so we can't emulate EXCEPT ALL - @Category({ NoH2.class, NoMySQL.class, NoFirebird.class, NoHibernate42.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoH2.class, NoMySQL.class, NoEclipselink.class }) public void testExceptAll() { FinalSetOperationCriteriaBuilder cb = cbf .create(em, Document.class, "d1") @@ -303,7 +299,7 @@ public void testExceptAll() { } @Test - @Category({ NoMySQL.class, NoFirebird.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoMySQL.class, NoEclipselink.class }) public void testExcept() { FinalSetOperationCriteriaBuilder cb = cbf .create(em, Document.class, "d1") @@ -326,9 +322,8 @@ public void testExcept() { } @Test - // TODO: why no hibernate 4.2? // NOTE: H2 does not support the PARTITION clause in the ROW_NUMBER function, so we can't emulate INTERSECT ALL - @Category({ NoH2.class, NoMySQL.class, NoFirebird.class, NoHibernate42.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoH2.class, NoMySQL.class, NoEclipselink.class }) public void testIntersectAll() { FinalSetOperationCriteriaBuilder cb = cbf.create(em, String.class) .from(Document.class, "d1") @@ -352,7 +347,7 @@ public void testIntersectAll() { } @Test - @Category({ NoMySQL.class, NoFirebird.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoMySQL.class, NoEclipselink.class }) public void testIntersect() { FinalSetOperationCriteriaBuilder cb = cbf .create(em, Document.class, "d1") @@ -377,7 +372,7 @@ public void testIntersect() { /* Set operation nesting */ @Test - @Category({ NoMySQL.class, NoFirebird.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoMySQL.class, NoEclipselink.class }) public void testNestedIntersectWithUnion() { FinalSetOperationCriteriaBuilder cb = cbf .startSet(em, Document.class) @@ -412,7 +407,7 @@ public void testNestedIntersectWithUnion() { } @Test - @Category({ NoMySQL.class, NoFirebird.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoMySQL.class, NoEclipselink.class }) public void testIntersectWithNestedUnion() { FinalSetOperationCriteriaBuilder cb = cbf .create(em, Document.class) @@ -443,7 +438,7 @@ public void testIntersectWithNestedUnion() { } @Test - @Category({ NoMySQL.class, NoFirebird.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoMySQL.class, NoEclipselink.class }) public void testRightNesting() { FinalSetOperationCriteriaBuilder cb = cbf .create(em, Document.class) @@ -493,7 +488,7 @@ public void testRightNesting() { } @Test - @Category({ NoMySQL.class, NoFirebird.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoMySQL.class, NoEclipselink.class }) public void testLeftNesting() { FinalSetOperationCriteriaBuilder cb = cbf .startSet(em, Document.class) @@ -540,7 +535,7 @@ public void testLeftNesting() { } @Test - @Category({ NoMySQL.class, NoFirebird.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoMySQL.class, NoEclipselink.class }) public void testLeftRightNesting() { FinalSetOperationCriteriaBuilder cb = cbf .startSet(em, Document.class) @@ -596,7 +591,7 @@ public void testLeftRightNesting() { } @Test - @Category({ NoMySQL.class, NoFirebird.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoMySQL.class, NoEclipselink.class }) public void testAttributeOrderByLimit() { FinalSetOperationCriteriaBuilder cb = cbf .create(em, Document.class) @@ -642,7 +637,7 @@ public void testAttributeOrderByLimit() { } @Test - @Category({ NoMySQL.class, NoFirebird.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoMySQL.class, NoEclipselink.class }) public void testAliasOrderByLimit() { FinalSetOperationCriteriaBuilder cb = cbf.create(em, String.class) .from(Document.class, "d1") @@ -690,7 +685,7 @@ public void testAliasOrderByLimit() { // NOTE: H2 does not seem to support set operations in CTEs properly @Test - @Category({ NoH2.class, NoMySQL.class, NoFirebird.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoH2.class, NoMySQL.class, NoEclipselink.class }) public void testCTENesting() { FinalSetOperationCriteriaBuilder cb = cbf .create(em, Document.class, "d") @@ -763,7 +758,7 @@ public void testCTENesting() { // NOTE: H2 does not seem to support set operations in CTEs properly @Test - @Category({ NoH2.class, NoMySQL.class, NoFirebird.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoH2.class, NoMySQL.class, NoEclipselink.class }) public void testCTERightNesting() { FinalSetOperationCriteriaBuilder cb = cbf .create(em, Document.class, "d") @@ -812,7 +807,7 @@ public void testCTERightNesting() { // NOTE: H2 does not seem to support set operations in CTEs properly @Test - @Category({ NoH2.class, NoMySQL.class, NoFirebird.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoH2.class, NoMySQL.class, NoEclipselink.class }) public void testCTELeftNesting() { CriteriaBuilder cb = cbf.create(em, Document.class) .withStartSet(IdHolderCTE.class, false) @@ -876,7 +871,7 @@ public void testCTELeftNesting() { /* Subquery set operations */ @Test - @Category({ NoMySQL.class, NoFirebird.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoMySQL.class, NoEclipselink.class }) public void testSubqueryNesting() { CriteriaBuilder cb = cbf .create(em, Document.class, "d") @@ -931,7 +926,7 @@ public void testSubqueryNesting() { } @Test - @Category({ NoMySQL.class, NoFirebird.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoMySQL.class, NoEclipselink.class }) public void testSubqueryLeftNesting() { CriteriaBuilder cb = cbf .create(em, Document.class, "d") @@ -997,7 +992,7 @@ public void testSubqueryLeftNesting() { // NOTE: H2 does not seem to support set operations in subqueries with limit properly @Test - @Category({ NoH2.class, NoMySQL.class, NoFirebird.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoH2.class, NoMySQL.class, NoEclipselink.class }) public void testSubqueryOrderByLimit() { CriteriaBuilder cb = cbf.create(em, String.class) .from(Document.class, "doc") @@ -1047,7 +1042,7 @@ public void testSubqueryOrderByLimit() { } @Test - @Category({ NoMySQL.class, NoFirebird.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoMySQL.class, NoEclipselink.class }) public void testWithStartSetEmpty() { final CriteriaBuilder cb = cbf.create(em, IdHolderCTE.class) .withStartSet(IdHolderCTE.class, false) @@ -1076,8 +1071,7 @@ public void testWithStartSetEmpty() { } @Test - // H2 broke in 1.4.198, will be fixed in 1.4.200 - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class, NoH2.class }) + @Category({ NoEclipselink.class }) public void testSetSubqueryAliasIsolation() { CriteriaBuilder cb = cbf.create(em, Document.class) .from(Document.class, "d1") @@ -1109,7 +1103,7 @@ protected String setOperation(SetOperationType type, String... queries) { } @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoEclipselink.class }) public void testNotEndedLeaf() { CriteriaBuilder cb = cbf.create(em, Document.class); LeafOngoingSetOperationCriteriaBuilder result = cb @@ -1123,7 +1117,7 @@ public void testNotEndedLeaf() { } @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoEclipselink.class }) public void testNotEndedStart() { CriteriaBuilder cb = cbf.create(em, Document.class); StartOngoingSetOperationCriteriaBuilder> result = cb @@ -1135,7 +1129,7 @@ public void testNotEndedStart() { } @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoEclipselink.class }) public void testNotEndedStartLeaf() { CriteriaBuilder cb = cbf.create(em, Document.class); LeafOngoingFinalSetOperationCriteriaBuilder result = cb @@ -1147,7 +1141,7 @@ public void testNotEndedStartLeaf() { } @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoEclipselink.class }) public void testNotEndedOngoing() { CriteriaBuilder cb = cbf.create(em, Document.class); OngoingFinalSetOperationCriteriaBuilder> result = cb @@ -1159,7 +1153,7 @@ public void testNotEndedOngoing() { } @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoEclipselink.class }) public void testNotEndedOngoingLeaf() { CriteriaBuilder cb = cbf.create(em, Document.class); LeafOngoingFinalSetOperationCriteriaBuilder result = cb @@ -1171,7 +1165,7 @@ public void testNotEndedOngoingLeaf() { } @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class, NoMySQL.class }) + @Category({ NoMySQL.class, NoEclipselink.class }) public void testNotEndedSubqueryLeaf() { CriteriaBuilder cb = cbf.create(em, Document.class); FinalSetOperationSubqueryBuilder> result = cb diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/SingleValuedAssociationManyToOneTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/SingleValuedAssociationManyToOneTest.java index 252ced2b16..efd2300974 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/SingleValuedAssociationManyToOneTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/SingleValuedAssociationManyToOneTest.java @@ -7,7 +7,7 @@ import static org.junit.Assert.assertEquals; -import javax.persistence.Tuple; +import jakarta.persistence.Tuple; import com.blazebit.persistence.testsuite.entity.Document; import org.junit.Assert; diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/SingleValuedAssociationOneToOneJoinTableTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/SingleValuedAssociationOneToOneJoinTableTest.java index e13112e1ec..1e7c924398 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/SingleValuedAssociationOneToOneJoinTableTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/SingleValuedAssociationOneToOneJoinTableTest.java @@ -6,15 +6,7 @@ package com.blazebit.persistence.testsuite; import com.blazebit.persistence.CriteriaBuilder; -import com.blazebit.persistence.testsuite.base.jpa.category.NoDatanucleus; import com.blazebit.persistence.testsuite.base.jpa.category.NoEclipselink; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate42; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate43; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate50; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate51; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate52; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate53; -import com.blazebit.persistence.testsuite.base.jpa.category.NoOpenJPA; import com.blazebit.persistence.testsuite.entity.DocumentForOneToOneJoinTable; import com.blazebit.persistence.testsuite.entity.DocumentForOneToOne; import com.blazebit.persistence.testsuite.entity.DocumentInfo; @@ -23,7 +15,7 @@ import org.junit.Test; import org.junit.experimental.categories.Category; -import javax.persistence.Tuple; +import jakarta.persistence.Tuple; import static org.junit.Assert.assertEquals; @@ -32,8 +24,6 @@ * @author Christian Beikov * @since 1.2.0 */ -// NOTE: Datanucleus generates wrong DDL for OneToOne JoinTable mappings: https://github.com/datanucleus/datanucleus-core/issues/196 -@Category({ NoDatanucleus.class }) public class SingleValuedAssociationOneToOneJoinTableTest extends AbstractCoreTest { @Override @@ -55,7 +45,6 @@ public void oneToOneJoinTableSingleValuedAssociationIsNull() { } @Test - @Category({NoHibernate52.class, NoHibernate53.class}) public void oneToOneJoinTableSingleValuedAssociationRelativeIdAccess() { Assume.assumeFalse(supportsTableGroupJoins()); @@ -66,7 +55,7 @@ public void oneToOneJoinTableSingleValuedAssociationRelativeIdAccess() { } @Test - @Category({NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class, NoHibernate51.class, NoHibernate50.class, NoHibernate43.class, NoHibernate42.class}) + @Category({NoEclipselink.class}) public void oneToOneJoinTableSingleValuedAssociationRelativeIdAccessWithTableGroupJoins() { Assume.assumeTrue(supportsTableGroupJoins()); @@ -78,7 +67,6 @@ public void oneToOneJoinTableSingleValuedAssociationRelativeIdAccessWithTableGro } @Test - @Category({NoHibernate52.class, NoHibernate53.class}) public void oneToOneJoinTableSingleValuedAssociationAbsoluteIdAccess() { Assume.assumeFalse(supportsTableGroupJoins()); @@ -89,7 +77,7 @@ public void oneToOneJoinTableSingleValuedAssociationAbsoluteIdAccess() { } @Test - @Category({NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class, NoHibernate51.class, NoHibernate50.class, NoHibernate43.class, NoHibernate42.class}) + @Category({NoEclipselink.class}) public void oneToOneJoinTableSingleValuedAssociationAbsoluteIdAccessWithTableGroupJoins() { Assume.assumeTrue(supportsTableGroupJoins()); @@ -101,7 +89,6 @@ public void oneToOneJoinTableSingleValuedAssociationAbsoluteIdAccessWithTableGro } @Test - @Category({NoHibernate52.class, NoHibernate53.class}) public void oneToOneJoinTableSingleValuedAssociationIdAccessJoinOverride1() { Assume.assumeFalse(supportsTableGroupJoins()); @@ -113,7 +100,7 @@ public void oneToOneJoinTableSingleValuedAssociationIdAccessJoinOverride1() { } @Test - @Category({NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class, NoHibernate51.class, NoHibernate50.class, NoHibernate43.class, NoHibernate42.class}) + @Category({NoEclipselink.class}) public void oneToOneJoinTableSingleValuedAssociationIdAccessJoinOverride1WithTableGroupJoins() { Assume.assumeTrue(supportsTableGroupJoins()); @@ -144,7 +131,7 @@ public void oneToOneJoinTableSingleValuedAssociationIdAccessJoinOverride3() { } @Test - @Category({NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class, NoHibernate42.class, NoHibernate43.class, NoHibernate50.class}) + @Category({NoEclipselink.class}) public void leftJoinDereferenedForeignJoinTableWithTableGroupJoins() { Assume.assumeTrue(supportsTableGroupJoins()); @@ -157,7 +144,7 @@ public void leftJoinDereferenedForeignJoinTableWithTableGroupJoins() { } @Test - @Category({NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class, NoHibernate42.class, NoHibernate43.class, NoHibernate50.class}) + @Category({NoEclipselink.class}) public void leftJoinDereferenedForeignJoinTableInverseWithTableGroupJoins() { Assume.assumeTrue(supportsTableGroupJoins()); @@ -170,7 +157,7 @@ public void leftJoinDereferenedForeignJoinTableInverseWithTableGroupJoins() { } @Test - @Category({NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class, NoHibernate51.class, NoHibernate52.class, NoHibernate53.class}) + @Category({NoEclipselink.class}) public void leftJoinDereferenedForeignJoinTable() { Assume.assumeFalse(supportsTableGroupJoins()); Assume.assumeTrue(jpaProvider.supportsEntityJoin()); diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/SingleValuedAssociationOneToOneTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/SingleValuedAssociationOneToOneTest.java index fbcc3e4e60..e835f78873 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/SingleValuedAssociationOneToOneTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/SingleValuedAssociationOneToOneTest.java @@ -11,7 +11,7 @@ import org.junit.Assert; import org.junit.Test; -import javax.persistence.Tuple; +import jakarta.persistence.Tuple; import static org.junit.Assert.assertEquals; diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/SizeTransformationTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/SizeTransformationTest.java index 7a2b064395..4251d40eb5 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/SizeTransformationTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/SizeTransformationTest.java @@ -5,24 +5,24 @@ package com.blazebit.persistence.testsuite; +import java.util.List; + +import org.junit.Assert; +import org.junit.Test; +import org.junit.experimental.categories.Category; + import com.blazebit.persistence.ConfigurationProperties; import com.blazebit.persistence.CriteriaBuilder; import com.blazebit.persistence.impl.function.subquery.SubqueryFunction; -import com.blazebit.persistence.testsuite.base.jpa.category.NoDatanucleus; -import com.blazebit.persistence.testsuite.base.jpa.category.NoDatanucleus4; import com.blazebit.persistence.testsuite.base.jpa.category.NoMSSQL; +import com.blazebit.persistence.testsuite.base.jpa.category.NoOracle; import com.blazebit.persistence.testsuite.entity.Document; import com.blazebit.persistence.testsuite.entity.Person; import com.blazebit.persistence.testsuite.entity.Version; import com.blazebit.persistence.testsuite.entity.Workflow; import com.blazebit.persistence.testsuite.tx.TxVoidWork; -import org.junit.Assert; -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import javax.persistence.EntityManager; -import javax.persistence.Tuple; -import java.util.List; +import jakarta.persistence.EntityManager; +import jakarta.persistence.Tuple; import static org.junit.Assert.assertEquals; @@ -33,8 +33,6 @@ */ public class SizeTransformationTest extends AbstractCoreTest { - // TODO: create datanucleus issue - @Category(NoDatanucleus.class) @Test public void testSizeToCountTransformationWithElementCollectionIndexed1() { CriteriaBuilder cb = cbf.create(em, Tuple.class).from(Workflow.class, "w") @@ -44,8 +42,6 @@ public void testSizeToCountTransformationWithElementCollectionIndexed1() { cb.getResultList(); } - // TODO: create datanucleus issue - @Category(NoDatanucleus.class) @Test public void testSizeToCountTransformationWithElementCollectionIndexed2() { CriteriaBuilder cb = cbf.create(em, Tuple.class).from(Workflow.class, "w") @@ -57,8 +53,6 @@ public void testSizeToCountTransformationWithElementCollectionIndexed2() { cb.getResultList(); } - // TODO: create datanucleus issue - @Category(NoDatanucleus.class) @Test public void testSizeToCountTransformationWithElementCollectionBasic1() { CriteriaBuilder cb = cbf.create(em, Tuple.class).from(Workflow.class, "w") @@ -68,8 +62,6 @@ public void testSizeToCountTransformationWithElementCollectionBasic1() { cb.getResultList(); } - // TODO: create datanucleus issue - @Category(NoDatanucleus.class) @Test public void testSizeToCountTransformationWithElementCollectionBasic2() { CriteriaBuilder cb = cbf.create(em, Tuple.class).from(Workflow.class, "w") @@ -107,6 +99,8 @@ public void testSizeToCountTransformationWithList1() { } @Test + // NOTE: Hibernate ORM bug: https://hibernate.atlassian.net/browse/HHH-18838 + @Category({ NoOracle.class }) public void testSizeToCountTransformationWithList2() { CriteriaBuilder cb = cbf.create(em, Tuple.class).from(Document.class, "d") .select("SIZE(d.people)") @@ -132,6 +126,8 @@ public void testSizeToCountTransformationWithMap1() { } @Test + // NOTE: Hibernate ORM bug: https://hibernate.atlassian.net/browse/HHH-18838 + @Category({ NoOracle.class }) public void testSizeToCountTransformationWithMap2() { CriteriaBuilder cb = cbf.create(em, Tuple.class).from(Document.class, "d") .select("SIZE(d.contacts)") @@ -148,9 +144,6 @@ public void testSizeToCountTransformationWithMap2() { cb.getResultList(); } - // TODO: create datanucleus issue - // fails with datanucleus-4 - @Category(NoDatanucleus4.class) @Test public void testSizeToCountTransformationWithCollectionBag() { CriteriaBuilder cb = cbf.create(em, Tuple.class).from(Document.class, "d") @@ -160,9 +153,6 @@ public void testSizeToCountTransformationWithCollectionBag() { cb.getResultList(); } - // TODO: create datanucleus issue - // fails with datanucleus-5 - @Category(NoDatanucleus.class) @Test public void testSizeToCountTransformationWithListBag() { CriteriaBuilder cb = cbf.create(em, Tuple.class).from(Document.class, "d") @@ -183,9 +173,7 @@ public void testDuplicateSizeExpressionsInSelect() { cb.getResultList(); } - // NOTE: DataNucleus renders the literal `(1)` for the byte array parameter on PostgreSQL which is wrong @Test - @Category({ NoDatanucleus.class }) public void testDisableCountTransformationWhenParameterUsedInSelect() { CriteriaBuilder cb = cbf.create(em, Tuple.class).from(Document.class, "d") .select("CASE WHEN d.age > 0 THEN d.byteArray ELSE :byteArray END") diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/SubqueryTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/SubqueryTest.java index ee4aace095..e7b9929ebf 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/SubqueryTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/SubqueryTest.java @@ -5,30 +5,27 @@ package com.blazebit.persistence.testsuite; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; - -import javax.persistence.EntityManager; -import javax.persistence.Tuple; +import java.util.List; -import com.blazebit.persistence.spi.FunctionRenderContext; -import com.blazebit.persistence.spi.JpqlMacro; -import com.blazebit.persistence.testsuite.base.jpa.category.NoDatanucleus; -import com.blazebit.persistence.testsuite.base.jpa.category.NoEclipselink; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate; -import com.blazebit.persistence.testsuite.base.jpa.category.NoOpenJPA; -import com.blazebit.persistence.testsuite.tx.TxVoidWork; import org.junit.Test; +import org.junit.experimental.categories.Category; import com.blazebit.persistence.CriteriaBuilder; import com.blazebit.persistence.PaginatedCriteriaBuilder; import com.blazebit.persistence.impl.BuilderChainingException; +import com.blazebit.persistence.spi.FunctionRenderContext; +import com.blazebit.persistence.spi.JpqlMacro; +import com.blazebit.persistence.testsuite.base.jpa.category.NoEclipselink; +import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate; import com.blazebit.persistence.testsuite.entity.Document; import com.blazebit.persistence.testsuite.entity.Person; import com.blazebit.persistence.testsuite.entity.Version; -import org.junit.experimental.categories.Category; +import com.blazebit.persistence.testsuite.tx.TxVoidWork; +import jakarta.persistence.EntityManager; +import jakarta.persistence.Tuple; -import java.util.List; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; /** * @@ -327,7 +324,7 @@ public void testSubqueryCorrelatesOverRelation() { // This test compares ids @Test - @Category({ NoEclipselink.class, NoDatanucleus.class, NoOpenJPA.class }) + @Category({ NoEclipselink.class }) public void testSubqueryCorrelatesArrayExpression() { CriteriaBuilder crit = cbf.create(em, Document.class, "d") .whereExists() @@ -354,8 +351,6 @@ public void testSubqueryCorrelatesArrayExpressionEntityEqual() { } @Test - // TODO: Report datanucleus issue - @Category({ NoDatanucleus.class }) public void testMultipleCorrelationsWithJoins() { CriteriaBuilder crit = cbf.create(em, Document.class, "d") .where("owner").in() @@ -400,8 +395,6 @@ public void testMultipleCorrelationsWithJoins() { } @Test - // TODO: Report datanucleus issue - @Category({ NoDatanucleus.class }) public void testReorderExplicitJoins() { CriteriaBuilder crit = cbf.create(em, Document.class, "d") .where("owner").in() @@ -492,7 +485,9 @@ public void testSubqueryCollectionAccessAddsJoin() { crit.getResultList(); } + // NOTE: Hibernate ORM doesn't detect that it has to use the join alias column @Test + @Category({ NoHibernate.class }) public void testSubqueryUsesOuterJoin() { CriteriaBuilder cb = cbf.create(em, Tuple.class) .from(Document.class, "d") @@ -574,7 +569,7 @@ public void testMultipleJoinPathSubqueryCollectionAccess() { @Test // A special test for Hibernate that needs a different query to be generated to properly work - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoEclipselink.class }) public void testJoinElementCollectionsOnCorrelatedInverseAssociations() { CriteriaBuilder crit = cbf.create(em, Integer.class) .from(Document.class, "d") @@ -687,8 +682,6 @@ public void testPaginationWithOuterAttributeInSubquery() { } @Test - // NOTE: Datanucleus has a bug here: https://github.com/datanucleus/datanucleus-core/issues/173 - @Category({ NoDatanucleus.class }) public void testMultiLevelSubqueryAliasVisibility() { final CriteriaBuilder cb = cbf.create(em, Long.class) .from(Document.class, "d") @@ -714,8 +707,6 @@ public void testMultiLevelSubqueryAliasVisibility() { } @Test - // Test for issue #504 - @Category({ NoDatanucleus.class }) public void testMultiLevelSubqueryImplicitAliasCollision() { final CriteriaBuilder cb = cbf.create(em, Long.class) .from(Document.class) diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/TablePerClassTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/TablePerClassTest.java index d74a9bfc53..f62dd31c43 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/TablePerClassTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/TablePerClassTest.java @@ -13,7 +13,7 @@ import org.junit.Assert; import org.junit.Test; -import javax.persistence.EntityManager; +import jakarta.persistence.EntityManager; import java.util.List; /** diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/TreatMultiLevelTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/TreatMultiLevelTest.java index a8eced4e50..28fc99504a 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/TreatMultiLevelTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/TreatMultiLevelTest.java @@ -5,8 +5,12 @@ package com.blazebit.persistence.testsuite; +import java.util.List; + +import org.junit.Test; +import org.junit.experimental.categories.Category; + import com.blazebit.persistence.CriteriaBuilder; -import com.blazebit.persistence.testsuite.base.jpa.category.NoDatanucleus; import com.blazebit.persistence.testsuite.base.jpa.category.NoEclipselink; import com.blazebit.persistence.testsuite.entity.Parent; import com.blazebit.persistence.testsuite.entity.Sub1; @@ -15,12 +19,9 @@ import com.blazebit.persistence.testsuite.entity.Sub2; import com.blazebit.persistence.testsuite.entity.Sub2Sub1; import com.blazebit.persistence.testsuite.entity.Sub2Sub2; -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import java.util.List; -import static org.junit.Assert.*; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; /** * @@ -43,8 +44,6 @@ protected Class[] getEntityClasses() { } @Test - // NOTE: Datanucleus does not support root treats properly with joined inheritance. Maybe a bug? TODO: report the error - @Category({ NoDatanucleus.class }) public void implicitJoinTreatedRoot() { CriteriaBuilder criteria = cbf.create(em, Integer.class); criteria.from(Parent.class, "p"); @@ -54,9 +53,8 @@ public void implicitJoinTreatedRoot() { } @Test - // NOTE: Datanucleus does not seem to support this kind of model? TODO: report the error // NOTE: EclipseLink is just fundamentally broken in this regard... - @Category({ NoDatanucleus.class, NoEclipselink.class }) + @Category({ NoEclipselink.class }) public void multiTreatWithDiscriminatorColumn() { // Given Sub1 sub1 = new Sub1(); @@ -78,9 +76,8 @@ public void multiTreatWithDiscriminatorColumn() { } @Test - // NOTE: Datanucleus does not seem to support this kind of model? TODO: report the error // NOTE: EclipseLink is just fundamentally broken in this regard... - @Category({ NoDatanucleus.class, NoEclipselink.class }) + @Category({ NoEclipselink.class }) public void treatWithSuperTypeColumnAccess() { // Given Sub1 sub1 = new Sub1(); diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/TreatTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/TreatTest.java index 9575134a1e..7a50a82ee7 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/TreatTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/TreatTest.java @@ -5,16 +5,19 @@ package com.blazebit.persistence.testsuite; +import org.junit.Test; +import org.junit.experimental.categories.Category; + import com.blazebit.persistence.CriteriaBuilder; import com.blazebit.persistence.JoinType; import com.blazebit.persistence.parser.expression.SyntaxErrorException; -import com.blazebit.persistence.testsuite.base.jpa.category.NoDatanucleus; -import com.blazebit.persistence.testsuite.base.jpa.category.NoDatanucleus4; import com.blazebit.persistence.testsuite.base.jpa.category.NoEclipselink; import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate; -import com.blazebit.persistence.testsuite.entity.*; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import com.blazebit.persistence.testsuite.entity.IntIdEntity; +import com.blazebit.persistence.testsuite.entity.PolymorphicBase; +import com.blazebit.persistence.testsuite.entity.PolymorphicBaseContainer; +import com.blazebit.persistence.testsuite.entity.PolymorphicSub1; +import com.blazebit.persistence.testsuite.entity.PolymorphicSub2; import static org.junit.Assert.assertEquals; @@ -51,8 +54,6 @@ public void treatOfTreatAsExpressionRootNotAllowed() { } @Test - // NOTE: Datanucleus does not support root treats properly with joined inheritance. Maybe a bug? TODO: report the error - @Category({ NoDatanucleus.class }) public void implicitJoinTreatedRoot() { CriteriaBuilder criteria = cbf.create(em, Integer.class); criteria.from(PolymorphicBase.class, "p"); @@ -62,8 +63,6 @@ public void implicitJoinTreatedRoot() { } @Test - // NOTE: Datanucleus does not support root treats properly with joined inheritance. Maybe a bug? TODO: report the error - @Category({ NoDatanucleus.class }) public void treatInAggregateHaving() { CriteriaBuilder criteria = cbf.create(em, Integer.class); criteria.from(PolymorphicBase.class, "p"); @@ -78,8 +77,6 @@ public void treatInAggregateHaving() { } @Test - // NOTE: Datanucleus does not support root treats properly with joined inheritance. Maybe a bug? TODO: report the error - @Category({ NoDatanucleus.class }) public void treatedRootInCaseWhenCondition() { CriteriaBuilder criteria = cbf.create(em, Integer.class); criteria.from(PolymorphicBase.class, "p"); @@ -91,8 +88,6 @@ public void treatedRootInCaseWhenCondition() { } @Test - // NOTE: Datanucleus does not support root treats properly with joined inheritance. Maybe a bug? TODO: report the error - @Category({ NoDatanucleus.class }) public void treatedRootInCaseWhenResult() { CriteriaBuilder criteria = cbf.create(em, Integer.class); criteria.from(PolymorphicBase.class, "p"); @@ -104,10 +99,8 @@ public void treatedRootInCaseWhenResult() { } @Test - // NOTE: Datanucleus4 reports: We do not currently support JOIN to TREAT - // NOTE: Datanucleus does not support root treats properly with joined inheritance. Maybe a bug? TODO: report the error // NOTE: Eclipselink does not support root treat joins i.e. "JOIN TREAT(..).relation" - @Category({ NoDatanucleus.class , NoDatanucleus4.class, NoEclipselink.class }) + @Category({ NoEclipselink.class }) public void fetchJoinTreatedRoot() { CriteriaBuilder criteria = cbf.create(em, Integer.class); criteria.from(PolymorphicBase.class, "p"); @@ -117,10 +110,8 @@ public void fetchJoinTreatedRoot() { } @Test - // NOTE: Datanucleus4 reports: We do not currently support JOIN to TREAT - // NOTE: Datanucleus does not support root treats properly with joined inheritance. Maybe a bug? TODO: report the error // NOTE: Eclipselink does not support root treat joins i.e. "JOIN TREAT(..).relation" - @Category({ NoDatanucleus.class , NoDatanucleus4.class, NoEclipselink.class }) + @Category({ NoEclipselink.class }) public void fetchJoinTreatedNode() { CriteriaBuilder criteria = cbf.create(em, Integer.class); criteria.from(PolymorphicBase.class, "p"); @@ -131,8 +122,6 @@ public void fetchJoinTreatedNode() { } @Test - // NOTE: Datanucleus does not support root treats properly with joined inheritance. Maybe a bug? TODO: report the error - @Category({ NoDatanucleus.class }) public void implicitJoinTreatedRelation() { CriteriaBuilder criteria = cbf.create(em, Integer.class); criteria.from(PolymorphicBase.class, "p"); @@ -142,9 +131,8 @@ public void implicitJoinTreatedRelation() { } @Test - // NOTE: Datanucleus does not support root treats properly with joined inheritance. Maybe a bug? TODO: report the error // NOTE: Eclipselink does not support root treat joins i.e. "JOIN TREAT(..).relation" - @Category({ NoDatanucleus.class, NoEclipselink.class }) + @Category({ NoEclipselink.class }) public void singleValuedAssociationIdOfTreatedImplicitJoinedRelation() { CriteriaBuilder criteria = cbf.create(em, Integer.class); criteria.from(PolymorphicBase.class, "relation1"); @@ -154,10 +142,8 @@ public void singleValuedAssociationIdOfTreatedImplicitJoinedRelation() { } @Test - // NOTE: Datanucleus4 reports: We do not currently support JOIN to TREAT - // NOTE: Datanucleus does not support root treats properly with joined inheritance. Maybe a bug? TODO: report the error // NOTE: Eclipselink does not support root treat joins i.e. "JOIN TREAT(..).relation" - @Category({ NoDatanucleus.class , NoDatanucleus4.class, NoEclipselink.class }) + @Category({ NoEclipselink.class }) public void implicitJoinTreatedRootTreatJoin() { CriteriaBuilder criteria = cbf.create(em, Integer.class); criteria.from(PolymorphicBase.class, "p"); @@ -167,9 +153,6 @@ public void implicitJoinTreatedRootTreatJoin() { } @Test - // NOTE: Datanucleus4 reports: We do not currently support JOIN to TREAT - // NOTE: Datanucleus does not support root treats properly with joined inheritance. Maybe a bug? TODO: report the error - @Category({ NoDatanucleus.class, NoDatanucleus4.class }) public void joinTreatedRelation() { CriteriaBuilder criteria = cbf.create(em, Integer.class); criteria.from(PolymorphicBase.class, "p"); @@ -181,9 +164,8 @@ public void joinTreatedRelation() { } @Test - // NOTE: With datanucleus this only fails with INNER JOIN but works with left join. Maybe a bug? TODO: report the error // Eclipselink and Datanucleus do not support root treat joins - @Category({ NoDatanucleus.class, NoEclipselink.class}) + @Category({ NoEclipselink.class}) public void joinTreatedRoot() { CriteriaBuilder criteria = cbf.create(em, Integer.class); criteria.from(PolymorphicBase.class, "p"); @@ -194,9 +176,8 @@ public void joinTreatedRoot() { } @Test - // NOTE: With datanucleus this only fails with INNER JOIN but works with left join. Maybe a bug? TODO: report the error // Eclipselink does not support dereferencing of TREAT join path elements - @Category({ NoDatanucleus.class, NoEclipselink.class }) + @Category({ NoEclipselink.class }) public void joinTreatedRootEmbeddable() { CriteriaBuilder criteria = cbf.create(em, Integer.class); criteria.from(PolymorphicBase.class, "p"); @@ -207,9 +188,8 @@ public void joinTreatedRootEmbeddable() { } @Test - // NOTE: With datanucleus this only fails with INNER JOIN but works with left join. Maybe a bug? TODO: report the error // Eclipselink does not support dereferencing of TREAT join path elements - @Category({ NoDatanucleus.class, NoEclipselink.class }) + @Category({ NoEclipselink.class }) public void selectTreatedRootEmbeddable() { CriteriaBuilder criteria = cbf.create(em, Integer.class); criteria.from(PolymorphicBase.class, "p"); @@ -219,8 +199,7 @@ public void selectTreatedRootEmbeddable() { } @Test - // NOTE: With datanucleus this only fails with INNER JOIN but works with left join. Maybe a bug? TODO: report the error - @Category({ NoDatanucleus.class, NoHibernate.class }) + @Category({ NoHibernate.class }) public void treatJoinTreatedRootRelation() { CriteriaBuilder criteria = cbf.create(em, Integer.class); criteria.from(PolymorphicBase.class, "p"); @@ -233,8 +212,7 @@ public void treatJoinTreatedRootRelation() { } @Test - // NOTE: Datanucleus fails with a NPE - @Category({ NoEclipselink.class, NoDatanucleus4.class }) + @Category({ NoEclipselink.class }) public void implicitJoinTreatedImplicitCorrelation() { CriteriaBuilder crit = cbf.create(em, PolymorphicBase.class, "p") .whereExists().from(PolymorphicSub1.class, "sub1") diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/TreatedCorrelatedSubqueryTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/TreatedCorrelatedSubqueryTest.java index 1d23799eb4..b434b90d5a 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/TreatedCorrelatedSubqueryTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/TreatedCorrelatedSubqueryTest.java @@ -5,8 +5,13 @@ package com.blazebit.persistence.testsuite; +import java.util.List; + +import org.junit.Before; +import org.junit.Test; +import org.junit.experimental.categories.Category; + import com.blazebit.persistence.CriteriaBuilder; -import com.blazebit.persistence.testsuite.base.jpa.category.NoDatanucleus; import com.blazebit.persistence.testsuite.base.jpa.category.NoEclipselink; import com.blazebit.persistence.testsuite.entity.IntIdEntity; import com.blazebit.persistence.testsuite.entity.PolymorphicBase; @@ -14,12 +19,7 @@ import com.blazebit.persistence.testsuite.entity.PolymorphicSub1; import com.blazebit.persistence.testsuite.entity.PolymorphicSub2; import com.blazebit.persistence.testsuite.tx.TxVoidWork; -import org.junit.Before; -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import javax.persistence.EntityManager; -import java.util.List; +import jakarta.persistence.EntityManager; import static org.junit.Assert.assertEquals; @@ -28,8 +28,7 @@ * @since 1.4.0 */ // NOTE: EclipseLink does not support subtype property access which is required here -// NOTE: Seems Datanucleus fails to properly interpret the entity literal -@Category({ NoEclipselink.class, NoDatanucleus.class }) +@Category({ NoEclipselink.class }) public class TreatedCorrelatedSubqueryTest extends AbstractCoreTest { private PolymorphicSub1 root2; diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/TreatedEntityJoinTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/TreatedEntityJoinTest.java index 3622545a51..4afe506fb7 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/TreatedEntityJoinTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/TreatedEntityJoinTest.java @@ -5,25 +5,21 @@ package com.blazebit.persistence.testsuite; +import java.util.List; + +import org.junit.Before; +import org.junit.Test; +import org.junit.experimental.categories.Category; + import com.blazebit.persistence.CriteriaBuilder; -import com.blazebit.persistence.testsuite.base.jpa.category.NoDatanucleus; import com.blazebit.persistence.testsuite.base.jpa.category.NoEclipselink; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate42; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate43; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate50; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate51; import com.blazebit.persistence.testsuite.entity.IntIdEntity; import com.blazebit.persistence.testsuite.entity.PolymorphicBase; import com.blazebit.persistence.testsuite.entity.PolymorphicBaseContainer; import com.blazebit.persistence.testsuite.entity.PolymorphicSub1; import com.blazebit.persistence.testsuite.entity.PolymorphicSub2; import com.blazebit.persistence.testsuite.tx.TxVoidWork; -import org.junit.Before; -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import javax.persistence.EntityManager; -import java.util.List; +import jakarta.persistence.EntityManager; import static org.junit.Assert.assertEquals; @@ -31,9 +27,6 @@ * @author Moritz Becker * @since 1.4.0 */ -// NOTE: Requires entity joins which are supported since Hibernate 5.1, Datanucleus 5 and latest Eclipselink -// NOTE: Seems Datanucleus fails to properly interpret the entity literal -@Category({ NoHibernate42.class, NoHibernate43.class, NoHibernate50.class, NoDatanucleus.class }) public class TreatedEntityJoinTest extends AbstractCoreTest { private PolymorphicSub1 root2; @@ -116,7 +109,7 @@ public void test2() { // NOTE: EclipseLink requires a join for "relation1" that it doesn't add... @Test - @Category({ NoHibernate42.class, NoHibernate43.class, NoHibernate50.class, NoHibernate51.class, NoDatanucleus.class, NoEclipselink.class }) + @Category({ NoEclipselink.class }) public void entityJoinTreat() { CriteriaBuilder criteria = cbf.create(em, Integer.class); criteria.from(PolymorphicBase.class, "p"); diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/TupleTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/TupleTest.java index 4f4dc8d667..eb38901d84 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/TupleTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/TupleTest.java @@ -11,8 +11,8 @@ import com.blazebit.persistence.testsuite.tx.TxVoidWork; import org.junit.Test; -import javax.persistence.EntityManager; -import javax.persistence.Tuple; +import jakarta.persistence.EntityManager; +import jakarta.persistence.Tuple; import static org.junit.Assert.assertEquals; diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/UpdateEmbeddableComplexTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/UpdateEmbeddableComplexTest.java index d61b09222e..aeb1e5cb7e 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/UpdateEmbeddableComplexTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/UpdateEmbeddableComplexTest.java @@ -5,28 +5,23 @@ package com.blazebit.persistence.testsuite; -import static org.junit.Assert.assertEquals; - -import com.blazebit.persistence.testsuite.entity.EmbeddableTestEntitySub; import org.junit.Test; import org.junit.experimental.categories.Category; -import com.blazebit.persistence.testsuite.base.jpa.category.NoDatanucleus; import com.blazebit.persistence.testsuite.base.jpa.category.NoEclipselink; -import com.blazebit.persistence.testsuite.base.jpa.category.NoFirebird; import com.blazebit.persistence.testsuite.base.jpa.category.NoH2; import com.blazebit.persistence.testsuite.base.jpa.category.NoMySQL; -import com.blazebit.persistence.testsuite.base.jpa.category.NoOpenJPA; import com.blazebit.persistence.testsuite.base.jpa.category.NoOracle; -import com.blazebit.persistence.testsuite.base.jpa.category.NoSQLite; import com.blazebit.persistence.testsuite.entity.Document; import com.blazebit.persistence.testsuite.entity.EmbeddableTestEntity; import com.blazebit.persistence.testsuite.entity.EmbeddableTestEntityEmbeddable; import com.blazebit.persistence.testsuite.entity.EmbeddableTestEntityId; +import com.blazebit.persistence.testsuite.entity.EmbeddableTestEntitySub; import com.blazebit.persistence.testsuite.entity.IntIdEntity; import com.blazebit.persistence.testsuite.tx.TxVoidWork; +import jakarta.persistence.EntityManager; -import javax.persistence.EntityManager; +import static org.junit.Assert.assertEquals; /** * This kind of mapping is not required to be supported by a JPA implementation. @@ -55,7 +50,7 @@ protected Class[] getEntityClasses() { @Test // NOTE: EclipseLink doesn't support Map in embeddables: https://bugs.eclipse.org/bugs/show_bug.cgi?id=391062 // TODO: report that datanucleus doesn't support element collection in an embeddable - @Category({ NoH2.class, NoOracle.class, NoSQLite.class, NoFirebird.class, NoMySQL.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoH2.class, NoOracle.class, NoMySQL.class, NoEclipselink.class }) public void testUpdateWithReturningEmbeddable(){ final String newEmbeddableTestEntityIdKey = "newKey"; @@ -82,7 +77,7 @@ public void work(EntityManager em) { @Test // NOTE: EclipseLink doesn't support Map in embeddables: https://bugs.eclipse.org/bugs/show_bug.cgi?id=391062 // TODO: report that datanucleus doesn't support element collection in an embeddable - @Category({ NoH2.class, NoOracle.class, NoSQLite.class, NoFirebird.class, NoMySQL.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoH2.class, NoOracle.class, NoMySQL.class, NoEclipselink.class }) public void testUpdateWithReturningExplicitId(){ final String intIdEntity1Key = "1"; diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/UpdatePolymorphicTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/UpdatePolymorphicTest.java index ac50ceac44..28c67a2d70 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/UpdatePolymorphicTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/UpdatePolymorphicTest.java @@ -5,19 +5,21 @@ package com.blazebit.persistence.testsuite; +import java.util.List; + +import org.junit.Before; +import org.junit.Ignore; +import org.junit.Test; +import org.junit.experimental.categories.Category; + import com.blazebit.persistence.CriteriaBuilder; import com.blazebit.persistence.ReturningResult; import com.blazebit.persistence.UpdateCriteriaBuilder; -import com.blazebit.persistence.testsuite.base.jpa.category.NoDatanucleus; import com.blazebit.persistence.testsuite.base.jpa.category.NoEclipselink; -import com.blazebit.persistence.testsuite.base.jpa.category.NoFirebird; import com.blazebit.persistence.testsuite.base.jpa.category.NoH2; import com.blazebit.persistence.testsuite.base.jpa.category.NoMSSQL; import com.blazebit.persistence.testsuite.base.jpa.category.NoMySQL; -import com.blazebit.persistence.testsuite.base.jpa.category.NoMySQLOld; -import com.blazebit.persistence.testsuite.base.jpa.category.NoOpenJPA; import com.blazebit.persistence.testsuite.base.jpa.category.NoOracle; -import com.blazebit.persistence.testsuite.base.jpa.category.NoSQLite; import com.blazebit.persistence.testsuite.entity.IdHolderCTE; import com.blazebit.persistence.testsuite.entity.IntIdEntity; import com.blazebit.persistence.testsuite.entity.PolymorphicBase; @@ -31,14 +33,7 @@ import com.blazebit.persistence.testsuite.entity.TPCSub1; import com.blazebit.persistence.testsuite.entity.TPCSub2; import com.blazebit.persistence.testsuite.tx.TxVoidWork; -import org.junit.Before; -import org.junit.Ignore; -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import javax.persistence.EntityManager; - -import java.util.List; +import jakarta.persistence.EntityManager; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; @@ -157,9 +152,8 @@ public void work(EntityManager em) { } // NOTE: H2 and MySQL only support returning generated keys - // NOTE: MySQL does not support CTEs @Test - @Category({ NoH2.class, NoMySQLOld.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoH2.class, NoEclipselink.class }) public void testTablePerClassWithCte() { transactional(new TxVoidWork() { @Override @@ -190,9 +184,8 @@ public void work(EntityManager em) { } // NOTE: H2 and MySQL only support returning generated keys - // NOTE: MySQL does not support CTEs @Test - @Category({ NoH2.class, NoMySQLOld.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoH2.class, NoEclipselink.class }) public void testJoinedWithCte() { transactional(new TxVoidWork() { @Override @@ -223,9 +216,8 @@ public void work(EntityManager em) { } // NOTE: H2 and MySQL only support returning generated keys - // NOTE: MySQL does not support CTEs @Test - @Category({ NoH2.class, NoMySQLOld.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoH2.class, NoEclipselink.class }) public void testSingleTableWithCte() { transactional(new TxVoidWork() { @Override @@ -257,7 +249,7 @@ public void work(EntityManager em) { @Test // NOTE: H2 and MySQL only support returning generated keys - @Category({ NoH2.class, NoMySQL.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoH2.class, NoMySQL.class, NoEclipselink.class }) public void testTablePerClassReturning() { transactional(new TxVoidWork() { @Override @@ -278,7 +270,7 @@ public void work(EntityManager em) { @Test // NOTE: H2 and MySQL only support returning generated keys - @Category({ NoH2.class, NoMySQL.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoH2.class, NoMySQL.class, NoEclipselink.class }) public void testJoinedReturning() { transactional(new TxVoidWork() { @Override @@ -299,7 +291,7 @@ public void work(EntityManager em) { @Test // NOTE: H2 and MySQL only support returning generated keys - @Category({ NoH2.class, NoMySQL.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoH2.class, NoMySQL.class, NoEclipselink.class }) public void testSingleTableReturning() { transactional(new TxVoidWork() { @Override @@ -320,7 +312,7 @@ public void work(EntityManager em) { // NOTE: Currently only PostgreSQL and DB2 support returning from within a CTE @Test - @Category({ NoH2.class, NoOracle.class, NoMSSQL.class, NoSQLite.class, NoFirebird.class, NoMySQL.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoH2.class, NoOracle.class, NoMSSQL.class, NoMySQL.class, NoEclipselink.class }) public void testTablePerClassReturningInCTE() { transactional(new TxVoidWork() { @Override @@ -351,7 +343,7 @@ public void work(EntityManager em) { // NOTE: Currently only PostgreSQL and DB2 support returning from within a CTE @Test - @Category({ NoH2.class, NoOracle.class, NoMSSQL.class, NoSQLite.class, NoFirebird.class, NoMySQL.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoH2.class, NoOracle.class, NoMSSQL.class, NoMySQL.class, NoEclipselink.class }) public void testJoinedReturningInCTE() { transactional(new TxVoidWork() { @Override @@ -382,7 +374,7 @@ public void work(EntityManager em) { // NOTE: Currently only PostgreSQL and DB2 support returning from within a CTE @Test - @Category({ NoH2.class, NoOracle.class, NoMSSQL.class, NoSQLite.class, NoFirebird.class, NoMySQL.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoH2.class, NoOracle.class, NoMSSQL.class, NoMySQL.class, NoEclipselink.class }) public void testSingleTableReturningInCTE() { transactional(new TxVoidWork() { @Override @@ -417,7 +409,7 @@ public void work(EntityManager em) { // NOTE: Currently only PostgreSQL and DB2 support returning from within a CTE @Test - @Category({ NoH2.class, NoOracle.class, NoMSSQL.class, NoSQLite.class, NoFirebird.class, NoMySQL.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoH2.class, NoOracle.class, NoMSSQL.class, NoMySQL.class, NoEclipselink.class }) public void testTablePerClassReturningInCTESelectOld() { transactional(new TxVoidWork() { @Override @@ -450,7 +442,7 @@ public void work(EntityManager em) { // NOTE: Currently only PostgreSQL and DB2 support returning from within a CTE @Test - @Category({ NoH2.class, NoOracle.class, NoMSSQL.class, NoSQLite.class, NoFirebird.class, NoMySQL.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoH2.class, NoOracle.class, NoMSSQL.class, NoMySQL.class, NoEclipselink.class }) public void testJoinedReturningInCTESelectOld() { transactional(new TxVoidWork() { @Override @@ -483,7 +475,7 @@ public void work(EntityManager em) { // NOTE: Currently only PostgreSQL and DB2 support returning from within a CTE @Test - @Category({ NoH2.class, NoOracle.class, NoMSSQL.class, NoSQLite.class, NoFirebird.class, NoMySQL.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoH2.class, NoOracle.class, NoMSSQL.class, NoMySQL.class, NoEclipselink.class }) public void testSingleTableReturningInCTESelectOld() { transactional(new TxVoidWork() { @Override @@ -518,7 +510,7 @@ public void work(EntityManager em) { // NOTE: Currently only PostgreSQL and DB2 support returning from within a CTE @Test - @Category({ NoH2.class, NoOracle.class, NoMSSQL.class, NoSQLite.class, NoFirebird.class, NoMySQL.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoH2.class, NoOracle.class, NoMSSQL.class, NoMySQL.class, NoEclipselink.class }) public void testTablePerClassReturningInCTESelectNew() { transactional(new TxVoidWork() { @Override @@ -551,7 +543,7 @@ public void work(EntityManager em) { // NOTE: Currently only PostgreSQL and DB2 support returning from within a CTE @Test - @Category({ NoH2.class, NoOracle.class, NoMSSQL.class, NoSQLite.class, NoFirebird.class, NoMySQL.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoH2.class, NoOracle.class, NoMSSQL.class, NoMySQL.class, NoEclipselink.class }) public void testJoinedReturningInCTESelectNew() { transactional(new TxVoidWork() { @Override @@ -584,7 +576,7 @@ public void work(EntityManager em) { // NOTE: Currently only PostgreSQL and DB2 support returning from within a CTE @Test - @Category({ NoH2.class, NoOracle.class, NoMSSQL.class, NoSQLite.class, NoFirebird.class, NoMySQL.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoH2.class, NoOracle.class, NoMSSQL.class, NoMySQL.class, NoEclipselink.class }) public void testSingleTableReturningInCTESelectNew() { transactional(new TxVoidWork() { @Override diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/UpdateTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/UpdateTest.java index bd55e4c5c2..5b9c73931b 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/UpdateTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/UpdateTest.java @@ -5,35 +5,30 @@ package com.blazebit.persistence.testsuite; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.TreeSet; + +import org.junit.Before; +import org.junit.Test; +import org.junit.experimental.categories.Category; + import com.blazebit.persistence.CriteriaBuilder; import com.blazebit.persistence.ReturningResult; import com.blazebit.persistence.UpdateCriteriaBuilder; -import com.blazebit.persistence.testsuite.base.jpa.category.NoDatanucleus; -import com.blazebit.persistence.testsuite.base.jpa.category.NoDatanucleus4; import com.blazebit.persistence.testsuite.base.jpa.category.NoEclipselink; -import com.blazebit.persistence.testsuite.base.jpa.category.NoFirebird; import com.blazebit.persistence.testsuite.base.jpa.category.NoH2; import com.blazebit.persistence.testsuite.base.jpa.category.NoMSSQL; import com.blazebit.persistence.testsuite.base.jpa.category.NoMySQL; -import com.blazebit.persistence.testsuite.base.jpa.category.NoMySQLOld; -import com.blazebit.persistence.testsuite.base.jpa.category.NoOpenJPA; import com.blazebit.persistence.testsuite.base.jpa.category.NoOracle; -import com.blazebit.persistence.testsuite.base.jpa.category.NoSQLite; import com.blazebit.persistence.testsuite.entity.Document; import com.blazebit.persistence.testsuite.entity.DocumentNodeCTE; import com.blazebit.persistence.testsuite.entity.IdHolderCTE; import com.blazebit.persistence.testsuite.entity.NameObject; import com.blazebit.persistence.testsuite.entity.Person; import com.blazebit.persistence.testsuite.tx.TxVoidWork; -import org.junit.Before; -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import javax.persistence.EntityManager; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.TreeSet; +import jakarta.persistence.EntityManager; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; @@ -104,9 +99,8 @@ public void work(EntityManager em) { } // NOTE: EclipseLink can update neither d.nameObject.intIdEntity nor d.nameObject.intIdEntity.id so associations in embeddables don't work here - // NOTE: DN4 also doesn't seem to support this @Test - @Category({ NoEclipselink.class, NoDatanucleus4.class }) + @Category({ NoEclipselink.class }) public void testSetEmbeddable() { transactional(new TxVoidWork() { @Override @@ -126,7 +120,7 @@ public void work(EntityManager em) { // NOTE: This requires advanced SQL support @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoEclipselink.class }) public void testImplicitJoin() { transactional(new TxVoidWork() { @Override @@ -147,7 +141,7 @@ public void work(EntityManager em) { // NOTE: This requires advanced SQL support @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoEclipselink.class }) public void testMultipleDeepImplicitJoin() { transactional(new TxVoidWork() { @Override @@ -176,7 +170,7 @@ public void work(EntityManager em) { // Test for issue #1615 // NOTE: This requires advanced SQL support @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoEclipselink.class }) public void testValuesJoin() { transactional(new TxVoidWork() { @Override @@ -245,7 +239,7 @@ public void work(EntityManager em) { // NOTE: H2 and MySQL only support returning generated keys @Test - @Category({ NoH2.class, NoMySQL.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoH2.class, NoMySQL.class, NoEclipselink.class }) public void testReturningAll() { transactional(new TxVoidWork() { @Override @@ -269,7 +263,7 @@ public void work(EntityManager em) { // NOTE: H2 and MySQL only support returning generated keys @Test - @Category({ NoH2.class, NoMySQL.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoH2.class, NoMySQL.class, NoEclipselink.class }) public void testReturningLast() { transactional(new TxVoidWork() { @Override @@ -292,7 +286,7 @@ public void work(EntityManager em) { // NOTE: H2 and MySQL only support returning generated keys // NOTE: MySQL does not support CTEs @Test - @Category({ NoH2.class, NoMySQL.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoH2.class, NoMySQL.class, NoEclipselink.class }) public void testReturningLastWithCte() { transactional(new TxVoidWork() { @Override @@ -326,7 +320,7 @@ public void work(EntityManager em) { // NOTE: Currently only PostgreSQL and DB2 support returning from within a CTE @Test - @Category({ NoH2.class, NoOracle.class, NoMSSQL.class, NoSQLite.class, NoFirebird.class, NoMySQL.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoH2.class, NoOracle.class, NoMSSQL.class, NoMySQL.class, NoEclipselink.class }) public void testUpdateReturningSelectOld() { transactional(new TxVoidWork() { @Override @@ -361,7 +355,7 @@ public void work(EntityManager em) { // NOTE: Currently only PostgreSQL and DB2 support returning from within a CTE @Test - @Category({ NoH2.class, NoOracle.class, NoMSSQL.class, NoSQLite.class, NoFirebird.class, NoMySQL.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoH2.class, NoOracle.class, NoMSSQL.class, NoMySQL.class, NoEclipselink.class }) public void testUpdateReturningSelectNew() { transactional(new TxVoidWork() { @Override @@ -398,7 +392,7 @@ public void work(EntityManager em) { // NOTE: H2 and MySQL only support returning generated keys // NOTE: MySQL does not support CTEs @Test - @Category({ NoH2.class, NoOracle.class, NoSQLite.class, NoFirebird.class, NoMySQL.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoH2.class, NoOracle.class, NoMySQL.class, NoEclipselink.class }) public void testQueryCaching() { TxVoidWork work = new TxVoidWork() { @Override diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/ValuesClauseTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/ValuesClauseTest.java index e8ec09a132..50a0bde8d1 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/ValuesClauseTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/ValuesClauseTest.java @@ -5,16 +5,25 @@ package com.blazebit.persistence.testsuite; +import java.sql.Connection; +import java.util.Arrays; +import java.util.Calendar; +import java.util.Collection; +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.TimeZone; +import java.util.function.Consumer; +import javax.sql.DataSource; + +import org.junit.AfterClass; +import org.junit.Before; +import org.junit.Test; +import org.junit.experimental.categories.Category; + import com.blazebit.persistence.ConfigurationProperties; import com.blazebit.persistence.CriteriaBuilder; -import com.blazebit.persistence.testsuite.base.jpa.category.NoDatanucleus; import com.blazebit.persistence.testsuite.base.jpa.category.NoEclipselink; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate42; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate43; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate50; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate51; -import com.blazebit.persistence.testsuite.base.jpa.category.NoMySQLOld; -import com.blazebit.persistence.testsuite.base.jpa.category.NoOpenJPA; import com.blazebit.persistence.testsuite.entity.Document; import com.blazebit.persistence.testsuite.entity.DocumentNodeCTE; import com.blazebit.persistence.testsuite.entity.DocumentType; @@ -24,25 +33,9 @@ import com.blazebit.persistence.testsuite.entity.Person; import com.blazebit.persistence.testsuite.entity.PersonCTE; import com.blazebit.persistence.testsuite.tx.TxVoidWork; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import javax.persistence.EntityManager; -import javax.persistence.Tuple; -import javax.persistence.TypedQuery; -import javax.sql.DataSource; -import java.sql.Connection; -import java.util.Arrays; -import java.util.Calendar; -import java.util.Collection; -import java.util.Collections; -import java.util.List; -import java.util.Map; -import java.util.TimeZone; -import java.util.function.Consumer; +import jakarta.persistence.EntityManager; +import jakarta.persistence.Tuple; +import jakarta.persistence.TypedQuery; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; @@ -121,7 +114,7 @@ public void setUp() { } @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoEclipselink.class }) public void testValuesEntityFunction() { CriteriaBuilder cb = cbf.create(em, Tuple.class); cb.fromValues(Long.class, "allowedAge", Collections.singleton(1L)); @@ -141,7 +134,7 @@ public void testValuesEntityFunction() { } @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoEclipselink.class }) public void testValuesEntityFunctionWithEmbeddable() { CriteriaBuilder cb = cbf.create(em, Tuple.class); cb.fromValues(NameObject.class, "embeddable", Collections.singleton(new NameObject("abc", "123"))); @@ -164,7 +157,7 @@ public void testValuesEntityFunctionWithEmbeddable() { @Test // NOTE: Only the latest Hibernate 5.2 properly implements support for selecting element collections - @Category({ NoHibernate42.class, NoHibernate43.class, NoHibernate50.class, NoHibernate51.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoEclipselink.class }) public void testValuesEntityFunctionWithPluralOnlyEmbeddable() { CriteriaBuilder cb = cbf.create(em, Tuple.class); cb.fromValues(NameObjectContainer.class, "embeddable", Collections.singleton(new NameObjectContainer("test", new NameObject("abc", "123")))); @@ -187,7 +180,7 @@ public void testValuesEntityFunctionWithPluralOnlyEmbeddable() { } @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoEclipselink.class }) public void testValuesEntityFunctionLikeBasic() { CriteriaBuilder cb = cbf.create(em, Tuple.class); cb.fromValues(Document.class, "name", "n", Collections.singleton("someName")); @@ -202,7 +195,7 @@ public void testValuesEntityFunctionLikeBasic() { } @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoEclipselink.class }) public void testValuesEntityFunctionLikeEnum() { CriteriaBuilder cb = cbf.create(em, Tuple.class); cb.fromValues(Document.class, "documentType", "t", Collections.singleton(DocumentType.NOVEL)); @@ -217,7 +210,7 @@ public void testValuesEntityFunctionLikeEnum() { } @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoEclipselink.class }) public void testValuesEntityFunctionLikeCalendar() { CriteriaBuilder cb = cbf.create(em, Tuple.class); Calendar cal = Calendar.getInstance(); @@ -238,7 +231,7 @@ public void testValuesEntityFunctionLikeCalendar() { } @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoEclipselink.class }) public void testValuesEntityFunctionLikeEmbeddable() { CriteriaBuilder cb = cbf.create(em, Tuple.class); cb.fromValues(Document.class, "nameObject", "t", Collections.singleton(new NameObject("123", "abc"))); @@ -253,7 +246,7 @@ public void testValuesEntityFunctionLikeEmbeddable() { } @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoEclipselink.class }) public void testValuesEntityFunctionLikeEntity() { CriteriaBuilder cb = cbf.create(em, Tuple.class); cb.fromValues(Document.class, "owner", "t", Collections.singleton(new Person(1L))); @@ -268,7 +261,7 @@ public void testValuesEntityFunctionLikeEntity() { } @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoEclipselink.class }) public void testValuesEntityFunctionLikePluralBasic() { CriteriaBuilder cb = cbf.create(em, Tuple.class); cb.fromValues(Document.class, "strings", "t", Collections.singleton("test")); @@ -284,7 +277,7 @@ public void testValuesEntityFunctionLikePluralBasic() { @Test // NOTE: Only the latest Hibernate 5.2 properly implements support for selecting element collections - @Category({ NoHibernate42.class, NoHibernate43.class, NoHibernate50.class, NoHibernate51.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoEclipselink.class }) public void testValuesEntityFunctionLikePluralEmbeddable() { CriteriaBuilder cb = cbf.create(em, Tuple.class); cb.fromValues(Document.class, "names", "t", Collections.singleton(new NameObject("123", "abc"))); @@ -299,7 +292,7 @@ public void testValuesEntityFunctionLikePluralEmbeddable() { } @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoEclipselink.class }) public void testValuesEntityFunctionLikePluralEntity() { CriteriaBuilder cb = cbf.create(em, Tuple.class); cb.fromValues(Document.class, "partners", "t", Collections.singleton(new Person(1L))); @@ -314,7 +307,7 @@ public void testValuesEntityFunctionLikePluralEntity() { } @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoEclipselink.class }) public void testValuesEntityFunctionLikePluralIndex() { CriteriaBuilder cb = cbf.create(em, Tuple.class); cb.fromValues(Document.class, "INDEX(people)", "t", Collections.singleton(1)); @@ -329,7 +322,7 @@ public void testValuesEntityFunctionLikePluralIndex() { } @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoEclipselink.class }) public void testValuesEntityFunctionLikePluralKey() { CriteriaBuilder cb = cbf.create(em, Tuple.class); cb.fromValues(Document.class, "KEY(stringMap)", "t", Collections.singleton("key")); @@ -344,7 +337,7 @@ public void testValuesEntityFunctionLikePluralKey() { } @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoEclipselink.class }) public void testIdentifiableValuesEntityFunctionGroupBy() { CriteriaBuilder cb = cbf.create(em, Tuple.class); @@ -361,7 +354,7 @@ public void testIdentifiableValuesEntityFunctionGroupBy() { // Test for #305 @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoEclipselink.class }) public void testValuesEntityFunctionWithParameterInSelect() { CriteriaBuilder cb = cbf.create(em, Tuple.class); cb.fromValues(Long.class, "allowedAge", Arrays.asList(1L, 2L)); @@ -384,7 +377,7 @@ public void testValuesEntityFunctionWithParameterInSelect() { // Test for #305 @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoEclipselink.class }) public void testValuesEntityFunctionWithParameterInSelectSubquery() { CriteriaBuilder cb = cbf.create(em, Tuple.class); cb.from(Document.class, "doc"); @@ -404,7 +397,7 @@ public void testValuesEntityFunctionWithParameterInSelectSubquery() { } @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoEclipselink.class }) public void testValuesEntityFunctionParameters() { CriteriaBuilder cb = cbf.create(em, Tuple.class); cb.fromValues(Long.class, "allowedAge", Arrays.asList(1L, 2L)); @@ -429,8 +422,7 @@ public void testValuesEntityFunctionParameters() { } @Test - // NOTE: Entity joins are supported since Hibernate 5.1, Datanucleus 5 and latest Eclipselink - @Category({ NoHibernate42.class, NoHibernate43.class, NoHibernate50.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoEclipselink.class }) public void testValuesEntityFunctionLeftJoin() { CriteriaBuilder cb = cbf.create(em, Tuple.class); cb.fromValues(Long.class, "allowedAge", Arrays.asList(1L, 2L, 3L)); @@ -461,8 +453,7 @@ public void testValuesEntityFunctionLeftJoin() { } @Test - // NOTE: Entity joins are supported since Hibernate 5.1, Datanucleus 5 and latest Eclipselink - @Category({ NoHibernate42.class, NoHibernate43.class, NoHibernate50.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoEclipselink.class }) public void testValuesEntityFunctionWithEntity() { CriteriaBuilder cb = cbf.create(em, Tuple.class); cb.fromValues(IntIdEntity.class, "intEntity", Arrays.asList( @@ -493,8 +484,7 @@ public void testValuesEntityFunctionWithEntity() { } @Test - // NOTE: Entity joins are supported since Hibernate 5.1, Datanucleus 5 and latest Eclipselink - @Category({ NoHibernate42.class, NoHibernate43.class, NoHibernate50.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoEclipselink.class }) public void testValuesEntityFunctionParameter() { CriteriaBuilder cb = cbf.create(em, Tuple.class); cb.fromValues(IntIdEntity.class, "intEntity", 1); @@ -547,8 +537,7 @@ public void testValuesEntityFunctionParameter() { } @Test - // NOTE: Entity joins are supported since Hibernate 5.1, Datanucleus 5 and latest Eclipselink - @Category({ NoHibernate42.class, NoHibernate43.class, NoHibernate50.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoEclipselink.class }) public void testValuesEntityFunctionParameterWithoutNullsFilter() { CriteriaBuilder cb = cbf.create(em, Tuple.class); cb.setProperty(ConfigurationProperties.VALUES_CLAUSE_FILTER_NULLS, "false"); @@ -571,11 +560,7 @@ public void testValuesEntityFunctionParameterWithoutNullsFilter() { } @Test - // NOTE: Entity joins are supported since Hibernate 5.1, Datanucleus 5 and latest Eclipselink -// @Category({ NoHibernate42.class, NoHibernate43.class, NoHibernate50.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) - // No hibernate for now, see https://hibernate.atlassian.net/browse/HHH-11340 - // H2 before 1.4.199 does not support parameters in the CTE http://dba.stackexchange.com/a/78449 - @Category({ NoHibernate42.class, NoHibernate43.class, NoHibernate50.class, NoHibernate51.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class, NoMySQLOld.class }) + @Category({ NoEclipselink.class }) public void testValuesEntityFunctionInCte() { CriteriaBuilder cb = cbf.create(em, Tuple.class); cb.setProperty(ConfigurationProperties.VALUES_CLAUSE_FILTER_NULLS, "false"); @@ -606,7 +591,7 @@ public void testValuesEntityFunctionInCte() { } @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoEclipselink.class }) public void testValuesEntityFunctionWithCteEntity() { CriteriaBuilder cb = cbf.create(em, Tuple.class); cb.setProperty(ConfigurationProperties.VALUES_CLAUSE_FILTER_NULLS, "false"); @@ -625,7 +610,7 @@ public void testValuesEntityFunctionWithCteEntity() { } @Test - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) + @Category({ NoEclipselink.class }) public void testFromValuesWithEmbeddables() { final Document doc1 = new Document("doc1"); doc1.setNameObject(new NameObject("doc1Primary", "doc1Secondary")); @@ -643,8 +628,7 @@ public void testFromValuesWithEmbeddables() { } @Test - // H2 before 1.4.199 does not support parameters in the CTE http://dba.stackexchange.com/a/78449 - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class, NoMySQLOld.class }) + @Category({ NoEclipselink.class }) public void testValuesEntityFunctionWithCteInCteWithSetOperation() { CriteriaBuilder cb = cbf.create(em, Tuple.class); cb.setProperty(ConfigurationProperties.VALUES_CLAUSE_FILTER_NULLS, "false"); @@ -678,8 +662,7 @@ public void testValuesEntityFunctionWithCteInCteWithSetOperation() { } @Test - // H2 before 1.4.199 does not support parameters in the CTE http://dba.stackexchange.com/a/78449 - @Category({ NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class, NoMySQLOld.class }) + @Category({ NoEclipselink.class }) public void testIdentifiableValuesEntityFunction() { CriteriaBuilder cb = cbf.create(em, Tuple.class); cb.setProperty(ConfigurationProperties.VALUES_CLAUSE_FILTER_NULLS, "false"); diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/WhereTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/WhereTest.java index 036e51dfac..608147be1e 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/WhereTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/WhereTest.java @@ -18,7 +18,7 @@ import com.blazebit.persistence.testsuite.entity.Document; import com.blazebit.persistence.testsuite.entity.Person; -import javax.persistence.Tuple; +import jakarta.persistence.Tuple; /** * diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/WindowFunctionTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/WindowFunctionTest.java index 2d4e6dd04c..b58197076d 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/WindowFunctionTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/WindowFunctionTest.java @@ -5,18 +5,19 @@ package com.blazebit.persistence.testsuite; +import java.util.List; + +import org.junit.Test; +import org.junit.experimental.categories.Category; + import com.blazebit.persistence.CriteriaBuilder; import com.blazebit.persistence.testsuite.base.jpa.category.NoMSSQL; -import com.blazebit.persistence.testsuite.base.jpa.category.NoMySQLOld; +import com.blazebit.persistence.testsuite.base.jpa.category.NoMySQL; import com.blazebit.persistence.testsuite.base.jpa.category.NoOracle; import com.blazebit.persistence.testsuite.entity.Person; import com.blazebit.persistence.testsuite.tx.TxVoidWork; -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import javax.persistence.EntityManager; -import javax.persistence.Tuple; -import java.util.List; +import jakarta.persistence.EntityManager; +import jakarta.persistence.Tuple; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; @@ -27,7 +28,6 @@ * @author Sayra Ranjha * @since 1.4.0 */ -@Category({ NoMySQLOld.class }) public class WindowFunctionTest extends AbstractCoreTest { @Override @@ -158,6 +158,8 @@ public void testBasicAggregatesWithVariousRanges() { } @Test + // NOTE: Hibernate ORM bug: https://hibernate.atlassian.net/browse/HHH-18836 + @Category({ NoMySQL.class }) public void testWindowBooleanAggregateOverRows() { CriteriaBuilder criteria = cbf.create(em, Tuple.class) .from(Person.class, "per") diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/treat/builder/AbstractTreatVariationsTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/treat/builder/AbstractTreatVariationsTest.java index c37cede356..9177c336fe 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/treat/builder/AbstractTreatVariationsTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/treat/builder/AbstractTreatVariationsTest.java @@ -33,7 +33,7 @@ import org.junit.FixMethodOrder; import org.junit.runners.MethodSorters; -import javax.persistence.EntityManager; +import jakarta.persistence.EntityManager; import java.util.ArrayList; import java.util.Arrays; import java.util.Iterator; diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/treat/builder/JoinManyToManyMapValueTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/treat/builder/JoinManyToManyMapValueTest.java index 2043ac4bab..ed227c4fb1 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/treat/builder/JoinManyToManyMapValueTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/treat/builder/JoinManyToManyMapValueTest.java @@ -5,7 +5,7 @@ package com.blazebit.persistence.testsuite.treat.builder; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate60; +import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate62; import org.junit.Assert; import org.junit.Test; import org.junit.experimental.categories.Category; @@ -16,7 +16,7 @@ // NOTE: Bug in ORM 6.3: https://hibernate.atlassian.net/browse/HHH-17385 @RunWith(Parameterized.class) -@Category({ NoHibernate60.class }) +@Category({ NoHibernate62.class }) public class JoinManyToManyMapValueTest extends AbstractTreatVariationsTest { public JoinManyToManyMapValueTest(String strategy, String objectPrefix) { diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/treat/builder/JoinOneToManyInverseSetTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/treat/builder/JoinOneToManyInverseSetTest.java index df29feb71e..1c5f262efa 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/treat/builder/JoinOneToManyInverseSetTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/treat/builder/JoinOneToManyInverseSetTest.java @@ -5,7 +5,7 @@ package com.blazebit.persistence.testsuite.treat.builder; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate60; +import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate62; import org.junit.Assert; import org.junit.Test; import org.junit.experimental.categories.Category; @@ -16,7 +16,7 @@ // NOTE: Bug in ORM 6.3: https://hibernate.atlassian.net/browse/HHH-17385 @RunWith(Parameterized.class) -@Category({ NoHibernate60.class }) +@Category({ NoHibernate62.class }) public class JoinOneToManyInverseSetTest extends AbstractTreatVariationsTest { public JoinOneToManyInverseSetTest(String strategy, String objectPrefix) { diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/treat/builder/JoinOneToManyListTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/treat/builder/JoinOneToManyListTest.java index 660a634813..e1125f68c9 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/treat/builder/JoinOneToManyListTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/treat/builder/JoinOneToManyListTest.java @@ -5,7 +5,7 @@ package com.blazebit.persistence.testsuite.treat.builder; -import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate60; +import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate62; import org.junit.Assert; import org.junit.Test; import org.junit.experimental.categories.Category; @@ -16,7 +16,7 @@ // NOTE: Bug in ORM 6.3: https://hibernate.atlassian.net/browse/HHH-17385 @RunWith(Parameterized.class) -@Category({ NoHibernate60.class }) +@Category({ NoHibernate62.class }) public class JoinOneToManyListTest extends AbstractTreatVariationsTest { public JoinOneToManyListTest(String strategy, String objectPrefix) { diff --git a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/treat/jpql/AbstractTreatVariationsTest.java b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/treat/jpql/AbstractTreatVariationsTest.java index 99f69c8341..2b1e7651ea 100644 --- a/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/treat/jpql/AbstractTreatVariationsTest.java +++ b/core/testsuite/src/test/java/com/blazebit/persistence/testsuite/treat/jpql/AbstractTreatVariationsTest.java @@ -6,11 +6,19 @@ package com.blazebit.persistence.testsuite.treat.jpql; +import java.util.Arrays; +import java.util.Iterator; +import java.util.List; +import java.util.Map; + +import org.junit.Assert; +import org.junit.FixMethodOrder; +import org.junit.experimental.categories.Category; +import org.junit.runners.MethodSorters; + import com.blazebit.persistence.testsuite.AbstractCoreTest; -import com.blazebit.persistence.testsuite.base.jpa.category.NoDatanucleus; import com.blazebit.persistence.testsuite.base.jpa.category.NoEclipselink; import com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate; -import com.blazebit.persistence.testsuite.base.jpa.category.NoOpenJPA; import com.blazebit.persistence.testsuite.entity.IntIdEntity; import com.blazebit.persistence.testsuite.treat.entity.Base; import com.blazebit.persistence.testsuite.treat.entity.BaseEmbeddable; @@ -28,21 +36,12 @@ import com.blazebit.persistence.testsuite.treat.entity.TablePerClassSub1; import com.blazebit.persistence.testsuite.treat.entity.TablePerClassSub2; import com.blazebit.persistence.testsuite.tx.TxVoidWork; -import org.junit.Assert; -import org.junit.FixMethodOrder; -import org.junit.experimental.categories.Category; -import org.junit.runners.MethodSorters; - -import javax.persistence.EntityManager; -import javax.persistence.TypedQuery; -import java.util.Arrays; -import java.util.Iterator; -import java.util.List; -import java.util.Map; +import jakarta.persistence.EntityManager; +import jakarta.persistence.TypedQuery; @FixMethodOrder(MethodSorters.NAME_ASCENDING) // NOTE: These tests are just for reference and have been copied and adapted form the jpa-treat-variations repository -@Category({ NoHibernate.class, NoDatanucleus.class, NoEclipselink.class, NoOpenJPA.class }) +@Category({ NoHibernate.class, NoEclipselink.class }) public abstract class AbstractTreatVariationsTest extends AbstractCoreTest { protected final String strategy; diff --git a/creating-a-release.md b/creating-a-release.md index 783f9fb78f..1c4a7ff966 100644 --- a/creating-a-release.md +++ b/creating-a-release.md @@ -17,14 +17,14 @@ A release involves various steps which are outlined here and should be kept up-t . Open `website/src/main/jbake/jbake.properties` and update `stable.version` to the latest released version . Open `website/pom.xml` and update the property `stable.version` to the latest released version, `snapshot.version` to the latest snapshot version and `series.version` to the current version series . Open `documentation/pom.xml` and update the property `stable.version` to the latest released version and `series.version` to the current version series -. Prepare a local Maven release via `mvnw -P "blazebit-release,h2,hibernate-5.6,deltaspike-1.9,spring-data-2.7.x" release:clean release:prepare "-Darguments=-DskipTests -DskipITs '-Djdk8.home=C:\Program Files\Eclipse Adoptium\jdk-8.0.332.9-hotspot'"` -. Actually deploy the release with `mvnw -P "blazebit-release,h2,hibernate-5.6,deltaspike-1.9,spring-data-2.7.x" release:perform "-Darguments=-DskipTests -DskipITs '-Djdk8.home=C:\Program Files\Eclipse Adoptium\jdk-8.0.332.9-hotspot' -DretryFailedDeploymentCount=10"` +. Prepare a local Maven release via `mvnw -P "blazebit-release,h2,hibernate-6.6,deltaspike-2.0,spring-data-3.3.x" release:clean release:prepare "-Darguments=-DskipTests -DskipITs"` +. Actually deploy the release with `mvnw -P "blazebit-release,h2,hibernate-6.6,deltaspike-2.0,spring-data-3.3.x" release:perform "-Darguments=-DskipTests -DskipITs -DretryFailedDeploymentCount=10"` . Goto https://oss.sonatype.org and login. In *Build Promotion* click on *Staging Repositories* then scroll down and find a repository named *comblazebit-...* . Click on the repository, then click *Close* and *Confirm*. Wait a few seconds, click *Refresh* and finally click *Release* and *Confirm* . Commit the changes and push the branch `git push origin`, as well as the created tag `git push origin TAG` . Create a GitHub release from the tag and use the same content as in `website/src/main/jbake/content/news/CURRENT_YEAR/blaze-persistence-VERSION-release.adoc` and add the _tar.gz_ and _zip_ artifacts of `blaze-persistence-distribution` as binaries to the release -. Push the new website changes only if you are working on the latest version series and first to the staging server by invoking `./build-deploy-website.sh staging '-Djdk8.home=C:\Program Files\Eclipse Adoptium\jdk-8.0.332.9-hotspot'` and if everything is alright push to production with `./build-deploy-website.sh prod '-Djdk8.home=C:\Program Files\Eclipse Adoptium\jdk-8.0.332.9-hotspot'` -. If you want to push just the documentation changes use `./build-deploy-documentation.sh staging '-Djdk8.home=C:\Program Files\Eclipse Adoptium\jdk-8.0.332.9-hotspot'` and if everything is alright also push to production with `./build-deploy-documentation.sh prod '-Djdk8.home=C:\Program Files\Eclipse Adoptium\jdk-8.0.332.9-hotspot'` +. Push the new website changes only if you are working on the latest version series and first to the staging server by invoking `./build-deploy-website.sh staging` and if everything is alright push to production with `./build-deploy-website.sh prod` +. If you want to push just the documentation changes use `./build-deploy-documentation.sh staging` and if everything is alright also push to production with `./build-deploy-documentation.sh prod` . Create tweet about new version . Update version in Quarkus ecosystem ci poms @@ -37,7 +37,7 @@ A private release involves the following steps . Make sure you have GPG installed and the executable is available on PATH . Make sure your Maven settings.xml has credentials for the server `blazebit` configured . Make sure your Maven settings.xml has a profile called `blazebit-release` with the property `gpg.passphrase` -. Make sure you have `C:\Program Files\Java\jdk-14` and `C:\Program Files\Eclipse Adoptium\jdk-8.0.332.9-hotspot` installed or update the `deploy-project-release.bat` script +. Make sure you have `C:\Program Files\Java\jdk-17` installed or update the `deploy-project-release.bat` script . Checkout the commercial branch for the minor version e.g. `1.5-commercial` . Invoke `mvn org.codehaus.mojo:versions-maven-plugin:2.1:set "-DnewVersion=1.5.X"` . Invoke `deploy-project-release.bat` diff --git a/deploy-project-release.bat b/deploy-project-release.bat index 1c259a3e56..5a4c7dcbe1 100644 --- a/deploy-project-release.bat +++ b/deploy-project-release.bat @@ -1,6 +1,6 @@ @echo off set default_project_path=%~dp0 -set default_jdk_path=C:\Program Files\Java\jdk-14 +set default_jdk_path=C:\Program Files\Java\jdk-17 set /p project_path="Path to project [%default_project_path%]: " @@ -16,4 +16,4 @@ if "%jdk_path%" == "" ( set JAVA_HOME=%jdk_path% echo "Using JAVA_HOME=%JAVA_HOME%" set MAVEN_OPTS="-Xmx1024m" -./mvnw -P "blazebit-release,h2,hibernate-5.6,deltaspike-1.9,spring-data-2.7.x" -f %project_path%\pom.xml install deploy:deploy -DskipTests -DskipITs "-Djdk8.home=C:\Program Files\Java\jdk1.8.0_181" -DaltDeploymentRepository=blazebit::default::https://nexus.blazebit.com/repository/maven-releases/ %* +./mvnw -P "blazebit-release,h2,hibernate-6.6,deltaspike-2.0,spring-data-3.3.x" -f %project_path%\pom.xml install deploy:deploy -DskipTests -DskipITs -DaltDeploymentRepository=blazebit::default::https://nexus.blazebit.com/repository/maven-releases/ %* diff --git a/dist/bom/pom.xml b/dist/bom/pom.xml index 47531a870d..e045cb97dc 100644 --- a/dist/bom/pom.xml +++ b/dist/bom/pom.xml @@ -10,7 +10,7 @@ com.blazebit blaze-persistence - 1.6.15-SNAPSHOT + 2.0.0-SNAPSHOT ../../pom.xml @@ -42,222 +42,72 @@ ${project.version} compile - - ${project.groupId} - blaze-persistence-core-api-jakarta - ${project.version} - compile - ${project.groupId} blaze-persistence-core-parser ${project.version} runtime - - ${project.groupId} - blaze-persistence-core-parser-jakarta - ${project.version} - runtime - ${project.groupId} blaze-persistence-core-impl ${project.version} runtime - - ${project.groupId} - blaze-persistence-core-impl-jakarta - ${project.version} - runtime - ${project.groupId} blaze-persistence-entity-view-api ${project.version} compile - - ${project.groupId} - blaze-persistence-entity-view-api-jakarta - ${project.version} - compile - ${project.groupId} blaze-persistence-entity-view-impl ${project.version} runtime - - ${project.groupId} - blaze-persistence-entity-view-impl-jakarta - ${project.version} - runtime - ${project.groupId} blaze-persistence-entity-view-processor ${project.version} provided - - ${project.groupId} - blaze-persistence-entity-view-processor-jakarta - ${project.version} - provided - ${project.groupId} blaze-persistence-jpa-criteria-api ${project.version} compile - - ${project.groupId} - blaze-persistence-jpa-criteria-api-jakarta - ${project.version} - compile - ${project.groupId} blaze-persistence-jpa-criteria-impl ${project.version} runtime - - ${project.groupId} - blaze-persistence-jpa-criteria-impl-jakarta - ${project.version} - runtime - - - ${project.groupId} - blaze-persistence-jpa-criteria-jpa-2-compatibility - ${project.version} - compile - ${project.groupId} blaze-persistence-integration-jpa-base ${project.version} runtime - - ${project.groupId} - blaze-persistence-integration-jpa-base-jakarta - ${project.version} - runtime - - - ${project.groupId} - blaze-persistence-integration-hibernate-base - ${project.version} - runtime - - - ${project.groupId} - blaze-persistence-integration-hibernate-base-jakarta - ${project.version} - runtime - ${project.groupId} blaze-persistence-integration-hibernate6-base ${project.version} runtime - - ${project.groupId} - blaze-persistence-integration-hibernate-4.2 - ${project.version} - runtime - - - ${project.groupId} - blaze-persistence-integration-hibernate-4.3 - ${project.version} - runtime - - - ${project.groupId} - blaze-persistence-integration-hibernate-5 - ${project.version} - runtime - - - ${project.groupId} - blaze-persistence-integration-hibernate-5.2 - ${project.version} - runtime - - - ${project.groupId} - blaze-persistence-integration-hibernate-5.3 - ${project.version} - runtime - - - ${project.groupId} - blaze-persistence-integration-hibernate-5.4 - ${project.version} - runtime - - - ${project.groupId} - blaze-persistence-integration-hibernate-5.5 - ${project.version} - runtime - - - ${project.groupId} - blaze-persistence-integration-hibernate-5.5-jakarta - ${project.version} - runtime - - - ${project.groupId} - blaze-persistence-integration-hibernate-5.6 - ${project.version} - runtime - - - ${project.groupId} - blaze-persistence-integration-hibernate-5.6-jakarta - ${project.version} - runtime - ${project.groupId} blaze-persistence-integration-hibernate-6.2 ${project.version} runtime - - ${project.groupId} - blaze-persistence-integration-datanucleus - ${project.version} - runtime - - - ${project.groupId} - blaze-persistence-integration-datanucleus-5.1 - ${project.version} - runtime - ${project.groupId} blaze-persistence-integration-eclipselink ${project.version} runtime - - ${project.groupId} - blaze-persistence-integration-openjpa - ${project.version} - runtime - ${project.groupId} @@ -265,18 +115,6 @@ ${project.version} runtime - - ${project.groupId} - blaze-persistence-integration-entity-view-cdi-jakarta - ${project.version} - runtime - - - ${project.groupId} - blaze-persistence-integration-entity-view-spring - ${project.version} - compile - ${project.groupId} blaze-persistence-integration-entity-view-spring-6.0 @@ -301,60 +139,6 @@ ${project.version} compile - - com.blazebit - blaze-persistence-integration-spring-data-1.x - ${project.version} - compile - - - com.blazebit - blaze-persistence-integration-spring-data-2.0 - ${project.version} - compile - - - com.blazebit - blaze-persistence-integration-spring-data-2.1 - ${project.version} - compile - - - com.blazebit - blaze-persistence-integration-spring-data-2.2 - ${project.version} - compile - - - com.blazebit - blaze-persistence-integration-spring-data-2.3 - ${project.version} - compile - - - com.blazebit - blaze-persistence-integration-spring-data-2.4 - ${project.version} - compile - - - com.blazebit - blaze-persistence-integration-spring-data-2.5 - ${project.version} - compile - - - com.blazebit - blaze-persistence-integration-spring-data-2.6 - ${project.version} - compile - - - com.blazebit - blaze-persistence-integration-spring-data-2.7 - ${project.version} - compile - com.blazebit blaze-persistence-integration-spring-data-3.1 @@ -373,12 +157,6 @@ ${project.version} compile - - com.blazebit - blaze-persistence-integration-spring-data-webmvc-jakarta - ${project.version} - compile - com.blazebit blaze-persistence-integration-spring-data-webflux @@ -391,12 +169,6 @@ ${project.version} compile - - com.blazebit - blaze-persistence-integration-spring-hateoas-webmvc-jakarta - ${project.version} - compile - com.blazebit blaze-persistence-integration-deltaspike-data-api @@ -411,13 +183,7 @@ com.blazebit - blaze-persistence-integration-deltaspike-data-impl-1.7 - ${project.version} - runtime - - - com.blazebit - blaze-persistence-integration-deltaspike-data-impl-1.8 + blaze-persistence-integration-deltaspike-data-impl-2.0 ${project.version} runtime @@ -451,72 +217,30 @@ ${project.version} runtime - - com.blazebit - blaze-persistence-integration-jaxrs-jackson-jakarta - ${project.version} - runtime - - - com.blazebit - blaze-persistence-integration-jaxrs-jsonb-jakarta - ${project.version} - runtime - ${project.groupId} blaze-persistence-integration-jackson ${project.version} compile - - ${project.groupId} - blaze-persistence-integration-jackson-jakarta - ${project.version} - compile - com.blazebit blaze-persistence-integration-jsonb ${project.version} compile - - com.blazebit - blaze-persistence-integration-jsonb-jakarta - ${project.version} - compile - com.blazebit blaze-persistence-integration-graphql ${project.version} compile - - com.blazebit - blaze-persistence-integration-graphql-jakarta - ${project.version} - compile - com.blazebit blaze-persistence-integration-graphql-spqr ${project.version} compile - - com.blazebit - blaze-persistence-integration-graphql-spqr-jakarta - ${project.version} - compile - - - com.blazebit - blaze-persistence-integration-graphql-dgs - ${project.version} - compile - com.blazebit blaze-persistence-integration-graphql-dgs-7.0 @@ -525,13 +249,13 @@ com.blazebit - blaze-persistence-integration-quarkus + blaze-persistence-integration-quarkus-3 ${project.version} runtime com.blazebit - blaze-persistence-integration-quarkus-deployment + blaze-persistence-integration-quarkus-3-deployment ${project.version} runtime @@ -541,12 +265,6 @@ ${project.version} compile - - com.blazebit - blaze-persistence-integration-querydsl-expressions-jakarta - ${project.version} - compile - diff --git a/dist/full/pom.xml b/dist/full/pom.xml deleted file mode 100644 index 7fb68f4de8..0000000000 --- a/dist/full/pom.xml +++ /dev/null @@ -1,325 +0,0 @@ - - - - - 4.0.0 - - - com.blazebit - blaze-persistence-distribution-parent - 1.6.15-SNAPSHOT - ../pom.xml - - - blaze-persistence-distribution - pom - - Blazebit Persistence Distribution - - - - - - - ${project.groupId} - blaze-common-utils - - - - - - ${project.groupId} - blaze-persistence-core-api - - - ${project.groupId} - blaze-persistence-core-parser - - - ${project.groupId} - blaze-persistence-core-impl - - - ${project.groupId} - blaze-persistence-entity-view-api - - - ${project.groupId} - blaze-persistence-entity-view-impl - - - ${project.groupId} - blaze-persistence-jpa-criteria-api - - - ${project.groupId} - blaze-persistence-jpa-criteria-impl - - - ${project.groupId} - blaze-persistence-jpa-criteria-jpa-2-compatibility - - - ${project.groupId} - blaze-persistence-integration-jpa-base - - - ${project.groupId} - blaze-persistence-integration-hibernate-base - - - ${project.groupId} - blaze-persistence-integration-hibernate6-base - - - ${project.groupId} - blaze-persistence-integration-hibernate-4.2 - - - ${project.groupId} - blaze-persistence-integration-hibernate-4.3 - - - ${project.groupId} - blaze-persistence-integration-hibernate-5 - - - ${project.groupId} - blaze-persistence-integration-hibernate-5.2 - - - ${project.groupId} - blaze-persistence-integration-hibernate-5.3 - - - ${project.groupId} - blaze-persistence-integration-hibernate-5.4 - - - ${project.groupId} - blaze-persistence-integration-hibernate-5.5 - - - ${project.groupId} - blaze-persistence-integration-hibernate-5.5-jakarta - - - ${project.groupId} - blaze-persistence-integration-hibernate-5.6 - - - ${project.groupId} - blaze-persistence-integration-hibernate-5.6-jakarta - - - ${project.groupId} - blaze-persistence-integration-hibernate-6.2 - - - ${project.groupId} - blaze-persistence-integration-datanucleus - - - ${project.groupId} - blaze-persistence-integration-datanucleus-5.1 - - - ${project.groupId} - blaze-persistence-integration-eclipselink - - - ${project.groupId} - blaze-persistence-integration-openjpa - - - - ${project.groupId} - blaze-persistence-integration-entity-view-cdi - - - - ${project.groupId} - blaze-persistence-integration-entity-view-spring - - - ${project.groupId} - blaze-persistence-integration-entity-view-spring-6.0 - - - ${project.groupId} - blaze-persistence-integration-spring-data-base - - - ${project.groupId} - blaze-persistence-integration-spring-data-base-3.1 - - - ${project.groupId} - blaze-persistence-integration-spring-data-base-3.3 - - - ${project.groupId} - blaze-persistence-integration-spring-data-1.x - - - ${project.groupId} - blaze-persistence-integration-spring-data-2.0 - - - ${project.groupId} - blaze-persistence-integration-spring-data-2.1 - - - ${project.groupId} - blaze-persistence-integration-spring-data-2.2 - - - ${project.groupId} - blaze-persistence-integration-spring-data-2.3 - - - ${project.groupId} - blaze-persistence-integration-spring-data-2.4 - - - ${project.groupId} - blaze-persistence-integration-spring-data-2.5 - - - ${project.groupId} - blaze-persistence-integration-spring-data-2.6 - - - ${project.groupId} - blaze-persistence-integration-spring-data-2.7 - - - ${project.groupId} - blaze-persistence-integration-spring-data-3.1 - - - ${project.groupId} - blaze-persistence-integration-spring-data-3.3 - - - ${project.groupId} - blaze-persistence-integration-spring-data-webmvc - - - ${project.groupId} - blaze-persistence-integration-spring-data-webmvc-jakarta - - - ${project.groupId} - blaze-persistence-integration-spring-data-webflux - - - ${project.groupId} - blaze-persistence-integration-deltaspike-data-api - - - ${project.groupId} - blaze-persistence-integration-deltaspike-data-base - - - ${project.groupId} - blaze-persistence-integration-deltaspike-data-impl-1.7 - - - ${project.groupId} - blaze-persistence-integration-deltaspike-data-impl-1.8 - - - ${project.groupId} - blaze-persistence-integration-deltaspike-data-rest-api - - - ${project.groupId} - blaze-persistence-integration-deltaspike-data-rest-impl - - - ${project.groupId} - blaze-persistence-integration-graphql - - - ${project.groupId} - blaze-persistence-integration-graphql-spqr - - - ${project.groupId} - blaze-persistence-integration-graphql-dgs - - - ${project.groupId} - blaze-persistence-integration-graphql-dgs-7.0 - - - ${project.groupId} - blaze-persistence-integration-spring-hateoas-webmvc - - - ${project.groupId} - blaze-persistence-integration-spring-hateoas-webmvc-jakarta - - - ${project.groupId} - blaze-persistence-integration-jackson - - - ${project.groupId} - blaze-persistence-integration-jsonb - - - ${project.groupId} - blaze-persistence-integration-jaxrs - - - ${project.groupId} - blaze-persistence-integration-jaxrs-jackson - - - ${project.groupId} - blaze-persistence-integration-jaxrs-jsonb - - - ${project.groupId} - blaze-persistence-integration-quarkus - - - ${project.groupId} - blaze-persistence-integration-quarkus-deployment - - - ${project.groupId} - blaze-persistence-integration-querydsl-expressions - - - - - - - maven-assembly-plugin - - - assemble - package - - single - - - - src/main/distribution/assembly.xml - - false - blaze-persistence-dist-${project.version} - - - - - - - - diff --git a/dist/full/src/main/distribution/assembly.xml b/dist/full/src/main/distribution/assembly.xml deleted file mode 100644 index 8ec8b13bb9..0000000000 --- a/dist/full/src/main/distribution/assembly.xml +++ /dev/null @@ -1,116 +0,0 @@ - - - - distribution - - zip - tar.gz - - - - ${project.basedir}/../.. - - README* - LICENSE* - - . - true - - - - - - com.blazebit:blaze-common-utils - - ${artifact.artifactId}-${artifact.version}.${artifact.extension} - lib/required/blaze-common-utils - - - - com.blazebit:blaze-persistence-core-* - - ${artifact.artifactId}-${project.version}.${artifact.extension} - lib/required/core - - - - com.blazebit:blaze-persistence-entity-view-* - - ${artifact.artifactId}-${project.version}.${artifact.extension} - lib/entity-view - - - - com.blazebit:blaze-persistence-jpa-criteria-* - - ${artifact.artifactId}-${project.version}.${artifact.extension} - lib/jpa-criteria - - - - com.blazebit:blaze-persistence-integration-jpa-base - com.blazebit:blaze-persistence-integration-jpa-base-jakarta - com.blazebit:blaze-persistence-integration-hibernate-* - - ${artifact.artifactId}-${project.version}.${artifact.extension} - lib/integration/hibernate - - - - com.blazebit:blaze-persistence-integration-jpa-base - com.blazebit:blaze-persistence-integration-datanucleus* - - ${artifact.artifactId}-${project.version}.${artifact.extension} - lib/integration/datanucleus - - - - com.blazebit:blaze-persistence-integration-jpa-base - com.blazebit:blaze-persistence-integration-eclipselink* - - ${artifact.artifactId}-${project.version}.${artifact.extension} - lib/integration/eclipselink - - - - com.blazebit:blaze-persistence-integration-jpa-base - com.blazebit:blaze-persistence-integration-openjpa* - - ${artifact.artifactId}-${project.version}.${artifact.extension} - lib/integration/openjpa - - - - com.blazebit:blaze-persistence-integration-quarkus - com.blazebit:blaze-persistence-integration-quarkus-runtime - - ${artifact.artifactId}-${project.version}.${artifact.extension} - lib/integration/quarkus - - - - com.blazebit:blaze-persistence-integration-querydsl-expressions - com.blazebit:blaze-persistence-integration-querydsl-expressions-jakarta - - ${artifact.artifactId}-${project.version}.${artifact.extension} - lib/integration/querydsl - - - - com.blazebit:blaze-persistence-integration-entity-view-* - com.blazebit:blaze-persistence-integration-spring-* - com.blazebit:blaze-persistence-integration-deltaspike-data-* - com.blazebit:blaze-persistence-integration-jaxrs* - com.blazebit:blaze-persistence-integration-jackson* - com.blazebit:blaze-persistence-integration-graphql* - - ${artifact.artifactId}-${project.version}.${artifact.extension} - lib/integration/entity-view - - - diff --git a/dist/pom.xml b/dist/pom.xml index cc36aaa126..d442f51f70 100644 --- a/dist/pom.xml +++ b/dist/pom.xml @@ -10,7 +10,7 @@ com.blazebit blaze-persistence-parent - 1.6.15-SNAPSHOT + 2.0.0-SNAPSHOT ../parent/pom.xml @@ -22,25 +22,4 @@ bom - - - - blazebit-release - - - 1.9 - - - bom - full - - - - dist - - bom - full - - - diff --git a/documentation/pom.xml b/documentation/pom.xml index 27d8a5d176..d87dc34019 100644 --- a/documentation/pom.xml +++ b/documentation/pom.xml @@ -10,7 +10,7 @@ com.blazebit blaze-persistence-parent - 1.6.15-SNAPSHOT + 2.0.0-SNAPSHOT ../parent/pom.xml @@ -22,7 +22,7 @@ 1.6.0-alpha.7 1.6.14 - 1.6 + 2.0 diff --git a/documentation/src/main/asciidoc/core/manual/en_US/getting_started.adoc b/documentation/src/main/asciidoc/core/manual/en_US/getting_started.adoc index e239d741ff..25518680c8 100644 --- a/documentation/src/main/asciidoc/core/manual/en_US/getting_started.adoc +++ b/documentation/src/main/asciidoc/core/manual/en_US/getting_started.adoc @@ -56,24 +56,6 @@ The required dependencies for the core module are ---- -or if you are using Jakarta JPA - -[source,xml] ----- - - com.blazebit - blaze-persistence-core-api-jakarta - ${blaze-persistence.version} - compile - - - com.blazebit - blaze-persistence-core-impl-jakarta - ${blaze-persistence.version} - runtime - ----- - Depending on the JPA provider that should be used, one of the following integrations is required [[maven-setup-hibernate62]] @@ -89,162 +71,6 @@ Depending on the JPA provider that should be used, one of the following integrat ---- -[[maven-setup-hibernate56-jakarta]] -===== Hibernate 5.6+ Jakarta - -[source,xml] ----- - - com.blazebit - blaze-persistence-integration-hibernate-5.6-jakarta - ${blaze-persistence.version} - runtime - ----- - -[[maven-setup-hibernate56]] -===== Hibernate 5.6 - -[source,xml] ----- - - com.blazebit - blaze-persistence-integration-hibernate-5.6 - ${blaze-persistence.version} - runtime - ----- - -[[maven-setup-hibernate55-jakarta]] -===== Hibernate 5.5 Jakarta - -[source,xml] ----- - - com.blazebit - blaze-persistence-integration-hibernate-5.5-jakarta - ${blaze-persistence.version} - runtime - ----- - -[[maven-setup-hibernate55]] -===== Hibernate 5.5 - -[source,xml] ----- - - com.blazebit - blaze-persistence-integration-hibernate-5.5 - ${blaze-persistence.version} - runtime - ----- - -[[maven-setup-hibernate54]] -===== Hibernate 5.4 - -[source,xml] ----- - - com.blazebit - blaze-persistence-integration-hibernate-5.4 - ${blaze-persistence.version} - runtime - ----- - -[[maven-setup-hibernate53]] -===== Hibernate 5.3 - -[source,xml] ----- - - com.blazebit - blaze-persistence-integration-hibernate-5.3 - ${blaze-persistence.version} - runtime - ----- - -[[maven-setup-hibernate52]] -===== Hibernate 5.2 - -[source,xml] ----- - - com.blazebit - blaze-persistence-integration-hibernate-5.2 - ${blaze-persistence.version} - runtime - ----- - -[[maven-setup-hibernate5]] -===== Hibernate 5+ - -[source,xml] ----- - - com.blazebit - blaze-persistence-integration-hibernate-5 - ${blaze-persistence.version} - runtime - ----- - -[[maven-setup-hibernate43]] -===== Hibernate 4.3 - -[source,xml] ----- - - com.blazebit - blaze-persistence-integration-hibernate-4.3 - ${blaze-persistence.version} - runtime - ----- - -[[maven-setup-hibernate42]] -===== Hibernate 4.2 - -[source,xml] ----- - - com.blazebit - blaze-persistence-integration-hibernate-4.2 - ${blaze-persistence.version} - runtime - ----- - -[[maven-setup-datanucleus51]] -===== Datanucleus 5.1 - -[source,xml] ----- - - com.blazebit - blaze-persistence-integration-datanucleus-5.1 - ${blaze-persistence.version} - runtime - ----- - -[[maven-setup-datanucleus]] -===== Datanucleus 4 and 5 - -[source,xml] ----- - - com.blazebit - blaze-persistence-integration-datanucleus - ${blaze-persistence.version} - runtime - ----- - [[maven-setup-eclipselink]] ===== EclipseLink @@ -258,19 +84,6 @@ Depending on the JPA provider that should be used, one of the following integrat ---- -[[maven-setup-openjpa]] -===== OpenJPA - -[source,xml] ----- - - com.blazebit - blaze-persistence-integration-openjpa - ${blaze-persistence.version} - runtime - ----- - [[maven-setup-querydsl-integration]] ===== Querydsl integration @@ -286,18 +99,6 @@ When you work with Querydsl you can additionally have first class integration by ---- -or if you are using Jakarta JPA - -[source,xml] ----- - - com.blazebit - blaze-persistence-integration-querydsl-expressions-jakarta - ${blaze-persistence.version} - compile - ----- - [[anchor-environment]] === Environments diff --git a/documentation/src/main/asciidoc/core/manual/en_US/querydsl.adoc b/documentation/src/main/asciidoc/core/manual/en_US/querydsl.adoc index 9988e9971e..7c171253cb 100644 --- a/documentation/src/main/asciidoc/core/manual/en_US/querydsl.adoc +++ b/documentation/src/main/asciidoc/core/manual/en_US/querydsl.adoc @@ -31,25 +31,7 @@ As outlined in the <> you need the following com.blazebit - blaze-persistence-integration-hibernate-5.6 - ${blaze-persistence.version} - runtime - ----- - -or if you are using Jakarta JPA - -[source,xml] ----- - - com.blazebit - blaze-persistence-integration-querydsl-expressions - ${blaze-persistence.version} - compile - - - com.blazebit - blaze-persistence-integration-hibernate-5.6-jakarta + blaze-persistence-integration-hibernate-6.2 ${blaze-persistence.version} runtime diff --git a/documentation/src/main/asciidoc/entity-view/manual/en_US/getting_started.adoc b/documentation/src/main/asciidoc/entity-view/manual/en_US/getting_started.adoc index cb96893f94..8cbba0a35f 100644 --- a/documentation/src/main/asciidoc/entity-view/manual/en_US/getting_started.adoc +++ b/documentation/src/main/asciidoc/entity-view/manual/en_US/getting_started.adoc @@ -48,24 +48,6 @@ The required dependencies for the entity view module are ---- -or if you are using Jakarta JPA - -[source,xml] ----- - - com.blazebit - blaze-persistence-entity-view-api-jakarta - ${blaze-persistence.version} - compile - - - com.blazebit - blaze-persistence-entity-view-impl-jakarta - ${blaze-persistence.version} - runtime - ----- - Depending on the environment, there are some integrations that help you with configuration [[maven-setup-apt]] @@ -83,18 +65,6 @@ The annotation processor will generate static entity view metamodels, static ent ---- -or if you are using Jakarta JPA - -[source,xml] ----- - - com.blazebit - blaze-persistence-entity-view-processor-jakarta - ${blaze-persistence.version} - provided - ----- - [[maven-setup-cdi-integration]] ===== CDI integration @@ -108,33 +78,9 @@ or if you are using Jakarta JPA ---- -or if you are using Jakarta JPA - -[source,xml] ----- - - com.blazebit - blaze-persistence-integration-entity-view-cdi - ${blaze-persistence.version} - runtime - ----- - [[maven-setup-spring-integration]] ===== Spring integration -[source,xml] ----- - - com.blazebit - blaze-persistence-integration-entity-view-spring - ${blaze-persistence.version} - compile - ----- - -or if you are using Jakarta APIs and Spring 6+ - [source,xml] ---- @@ -154,21 +100,19 @@ When you work with Spring Data you can additionally have first class integration ---- com.blazebit - blaze-persistence-integration-spring-data-2.7 + blaze-persistence-integration-spring-data-3.3 ${blaze-persistence.version} compile ---- -For Spring-Data version 2.6, 2.5, 2.4, 2.3, 2.2, 2.1, 2.0 or 1.x use the artifact with the respective suffix `2.6`, `2.5`, `2.4`, `2.3`, `2.2`, `2.1`, `2.0`, `1.x`. - -If you are using Jakarta APIs and Spring Framework 6+ / Spring Boot 3+, use this +For Spring-Data version 3.2 and 3.1, use this [source,xml] ---- com.blazebit - blaze-persistence-integration-spring-data-3.3 + blaze-persistence-integration-spring-data-3.1 ${blaze-persistence.version} compile @@ -195,36 +139,6 @@ NOTE: The Spring Data integration depends on the _jpa-criteria_ module ---- -or if you are using Jakarta JPA - -[source,xml] ----- - - com.blazebit - blaze-persistence-jpa-criteria-api-jakarta - ${blaze-persistence.version} - compile - - - com.blazebit - blaze-persistence-jpa-criteria-impl-jakarta - ${blaze-persistence.version} - runtime - ----- - -If a JPA provider that does not implement the JPA 2.1 specification like Hibernate 4.2 or OpenJPA is used, the following compatibility dependency is also required. - -[source,xml] ----- - - com.blazebit - blaze-persistence-jpa-criteria-jpa-2-compatibility - ${blaze-persistence.version} - compile - ----- - [[maven-setup-spring-hateoas-integration]] ===== Spring HATEOAS integration @@ -240,18 +154,6 @@ When you work with Spring HATEOAS you can additionally have first class support ---- -or if you are using Jakarta APIs and Spring Framework 6+ / Spring Boot 3+ use - -[source,xml] ----- - - com.blazebit - blaze-persistence-integration-spring-hateoas-webmvc-jakarta - ${blaze-persistence.version} - compile - ----- - More information about the integration can be found in the <>. [[quarkus-setup]] @@ -263,7 +165,7 @@ To use the Quarkus extension you need to add the following Maven dependency to y ---- com.blazebit - blaze-persistence-integration-quarkus + blaze-persistence-integration-quarkus-3 ${blaze-persistence.version} ---- diff --git a/documentation/src/main/asciidoc/entity-view/manual/en_US/graphql.adoc b/documentation/src/main/asciidoc/entity-view/manual/en_US/graphql.adoc index d6b5d29ca7..198cf9677e 100644 --- a/documentation/src/main/asciidoc/entity-view/manual/en_US/graphql.adoc +++ b/documentation/src/main/asciidoc/entity-view/manual/en_US/graphql.adoc @@ -22,18 +22,6 @@ To use the GraphQL integration you need the following Maven dependencies: ---- -or if you are using Jakarta JPA - -[source,xml] ----- - - com.blazebit - blaze-persistence-integration-graphql-jakarta - ${blaze-persistence.version} - compile - ----- - Note that the integration works with the de facto standard runtime for GraphQL which is `graphql-java`. At least version 17.3 is required. === Usage @@ -416,17 +404,6 @@ To use the SPQR GraphQL integration you need the following Maven dependencies: compile ---- - -or if you are using Jakarta JPA - -[source,xml] ----- - - com.blazebit - blaze-persistence-integration-graphql-spqr-jakarta - ${blaze-persistence.version} - compile - ---- The SPQR configuration is very simple and since the framework is fully declarative, you don't need a dedicated GraphQL schema definition. diff --git a/documentation/src/main/asciidoc/entity-view/manual/en_US/jaxrs.adoc b/documentation/src/main/asciidoc/entity-view/manual/en_US/jaxrs.adoc index 28349b0219..b7312bb84f 100644 --- a/documentation/src/main/asciidoc/entity-view/manual/en_US/jaxrs.adoc +++ b/documentation/src/main/asciidoc/entity-view/manual/en_US/jaxrs.adoc @@ -25,18 +25,6 @@ To use the Jackson integration directly you need the following Maven dependencie ---- -or if you are using Jakarta JPA - -[source,xml] ----- - - com.blazebit - blaze-persistence-integration-jaxrs-jackson-jakarta - ${blaze-persistence.version} - runtime - ----- - To use the JSONB integration directly you need the following Maven dependencies: [source,xml] @@ -49,18 +37,6 @@ To use the JSONB integration directly you need the following Maven dependencies: ---- -or if you are using Jakarta JPA - -[source,xml] ----- - - com.blazebit - blaze-persistence-integration-jaxrs-jsonb-jakarta - ${blaze-persistence.version} - runtime - ----- - [[jaxrs-features]] === Features diff --git a/documentation/src/main/asciidoc/entity-view/manual/en_US/serialization_support.adoc b/documentation/src/main/asciidoc/entity-view/manual/en_US/serialization_support.adoc index 538bcbeb00..c868b57bbb 100644 --- a/documentation/src/main/asciidoc/entity-view/manual/en_US/serialization_support.adoc +++ b/documentation/src/main/asciidoc/entity-view/manual/en_US/serialization_support.adoc @@ -47,18 +47,6 @@ To use the Jackson integration directly you need the following Maven dependencie ---- -or if you are using Jakarta JPA - -[source,xml] ----- - - com.blazebit - blaze-persistence-integration-jackson-jakarta - ${blaze-persistence.version} - compile - ----- - If you are using JAX-RS, Spring WebMvc or Spring WebFlux, consider using the already existing integrations instead to avoid unnecessary work. ==== Usage @@ -93,18 +81,6 @@ To use the JSONB integration directly you need the following Maven dependencies: ---- -or if you are using Jakarta JPA - -[source,xml] ----- - - com.blazebit - blaze-persistence-integration-jsonb-jakarta - ${blaze-persistence.version} - compile - ----- - If you are using JAX-RS, Spring WebMvc or Spring WebFlux, consider using the already existing integrations instead to avoid unnecessary work. ==== Usage diff --git a/documentation/src/main/asciidoc/entity-view/manual/en_US/spring_data.adoc b/documentation/src/main/asciidoc/entity-view/manual/en_US/spring_data.adoc index ffc133cc44..ba401a16af 100644 --- a/documentation/src/main/asciidoc/entity-view/manual/en_US/spring_data.adoc +++ b/documentation/src/main/asciidoc/entity-view/manual/en_US/spring_data.adoc @@ -16,27 +16,25 @@ In short, the following Maven dependencies are required ---- com.blazebit - blaze-persistence-integration-spring-data-2.7 + blaze-persistence-integration-spring-data-3.3 ${blaze-persistence.version} compile com.blazebit - blaze-persistence-integration-hibernate-5.6 + blaze-persistence-integration-hibernate-6.2 ${blaze-persistence.version} runtime ---- -For Spring-Data version 2.6, 2.5, 2.4, 2.3, 2.2, 2.1, 2.0 or 1.x use the `blaze-persistence-integration-spring-data` artifact with the respective suffix `2.6`, `2.5` `2.4`, `2.3`, `2.2`, `2.1`, `2.0`, `1.x`. - -If you are using Jakarta APIs and Spring Framework 6+ / Spring Boot 3+, use this +For Spring-Data version 3.2 or 3.1, use this [source,xml] ---- com.blazebit - blaze-persistence-integration-spring-data-3.3 + blaze-persistence-integration-spring-data-3.1 ${blaze-persistence.version} compile @@ -283,18 +281,6 @@ To setup the project for Spring Data WebMvc you have to add the following additi ---- -or if you are using Jakarta APIs and Spring 6+ - -[source,xml] ----- - - com.blazebit - blaze-persistence-integration-spring-data-webmvc-jakarta - ${blaze-persistence.version} - compile - ----- - ==== Usage First, a keyset pagination enabled repository is needed which can be done by using `KeysetAwarePage` as return type. diff --git a/documentation/src/main/asciidoc/entity-view/manual/en_US/spring_hateoas.adoc b/documentation/src/main/asciidoc/entity-view/manual/en_US/spring_hateoas.adoc index fc97df6bf1..c63329cded 100644 --- a/documentation/src/main/asciidoc/entity-view/manual/en_US/spring_hateoas.adoc +++ b/documentation/src/main/asciidoc/entity-view/manual/en_US/spring_hateoas.adoc @@ -18,24 +18,6 @@ In short, the following Maven dependencies are required ${blaze-persistence.version} compile - - com.blazebit - blaze-persistence-integration-hibernate-5.6 - ${blaze-persistence.version} - runtime - ----- - -or if you are using Jakarta APIs and Spring 6+ - -[source,xml] ----- - - ${project.groupId} - blaze-persistence-integration-spring-hateoas-webmvc-jakarta - ${blaze-persistence.version} - compile - com.blazebit blaze-persistence-integration-hibernate-6.2 diff --git a/entity-view/api-jakarta/pom.xml b/entity-view/api-jakarta/pom.xml deleted file mode 100644 index fba3e5d5e6..0000000000 --- a/entity-view/api-jakarta/pom.xml +++ /dev/null @@ -1,227 +0,0 @@ - - - - - 4.0.0 - - - com.blazebit - blaze-persistence-entity-view - 1.6.15-SNAPSHOT - ../pom.xml - - - blaze-persistence-entity-view-api-jakarta - jar - - - com.blazebit.persistence.view - - - - - ${project.groupId} - blaze-persistence-entity-view-api - provided - - - jakarta.persistence - jakarta.persistence-api - ${version.jakarta-jpa-api} - provided - - - ${project.groupId} - blaze-persistence-core-api-jakarta - - - - - - - maven-antrun-plugin - - - transform-jar - package - - run - - - - - - - - - - - - - - - - - - - - - - transform-sources-jar - package - - run - - - - - - - - - - - - - - - - - - - - - - - - transform-javadoc - package - - run - - - - - - - - - - - - - - - - - - - - - - - - - unpack-classes - package - - - - - - - run - - - - - - org.eclipse.transformer - org.eclipse.transformer.cli - 0.5.0 - - - ant-contrib - ant-contrib - 1.0b3 - - - ant - ant - - - - - biz.aQute.bnd - biz.aQute.bnd.transform - ${version.bnd} - compile - - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - attach-artifacts - package - - attach-artifact - - - - - ${project.build.directory}/${project.build.finalName}-sources.jar - sources - jar - - - - - - - - - - - blazebit-release - - - - org.codehaus.mojo - build-helper-maven-plugin - - - attach-artifacts - package - - attach-artifact - - - - - ${project.build.directory}/${project.build.finalName}-sources.jar - sources - jar - - - ${project.build.directory}/${project.build.finalName}-javadoc.jar - javadoc - jar - - - - - - - - - - - - diff --git a/entity-view/api-jar/pom.xml b/entity-view/api-jar/pom.xml deleted file mode 100644 index d2fbf1352f..0000000000 --- a/entity-view/api-jar/pom.xml +++ /dev/null @@ -1,121 +0,0 @@ - - - - - 4.0.0 - - - com.blazebit - blaze-persistence-entity-view - 1.6.15-SNAPSHOT - ../pom.xml - - - blaze-persistence-entity-view-api-jar - jar - - - com.blazebit.persistence.view - - - - - ${project.groupId} - blaze-persistence-core-api-jar - - - ${project.groupId} - blaze-persistence-entity-view-api - - - - - - - org.apache.maven.plugins - maven-shade-plugin - - - package - - shade - - - true - - - ${project.groupId}:blaze-persistence-entity-view-api - - META-INF/versions/** - module-info.class - - - - - - - - - - - - - blazebit-release - - - - maven-dependency-plugin - - - shade-javadoc - - copy - - - - - ${project.groupId} - blaze-persistence-entity-view-api - ${project.version} - jar - javadoc - true - ${project.build.directory} - ${project.artifactId}-${project.version}-javadoc.jar - - - - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - attach-artifacts - package - - attach-artifact - - - - - ${project.build.directory}/${project.artifactId}-${project.version}-javadoc.jar - javadoc - jar - - - - - - - - - - - - diff --git a/entity-view/api/pom.xml b/entity-view/api/pom.xml index ac5bfd006d..a3fbb4af59 100644 --- a/entity-view/api/pom.xml +++ b/entity-view/api/pom.xml @@ -10,7 +10,7 @@ com.blazebit blaze-persistence-entity-view - 1.6.15-SNAPSHOT + 2.0.0-SNAPSHOT ../pom.xml @@ -29,45 +29,21 @@ blaze-persistence-core-api - - org.apache.openejb - javaee-api + jakarta.persistence + jakarta.persistence-api + provided + + + jakarta.transaction + jakarta.transaction-api + provided + + + jakarta.enterprise + jakarta.enterprise.cdi-api provided - - - - org.moditect - moditect-maven-plugin - - - add-module-infos - package - - add-module-info - - - - - module ${module.name} { - requires transitive com.blazebit.persistence.core; - exports com.blazebit.persistence.view; - exports com.blazebit.persistence.view.change; - exports com.blazebit.persistence.view.filter; - exports com.blazebit.persistence.view.metamodel; - exports com.blazebit.persistence.view.spi; - exports com.blazebit.persistence.view.spi.type; - uses com.blazebit.persistence.view.spi.EntityViewConfigurationProvider; - } - - - - - - - - diff --git a/entity-view/api/src/main/java/com/blazebit/persistence/view/CorrelationBuilder.java b/entity-view/api/src/main/java/com/blazebit/persistence/view/CorrelationBuilder.java index 8f2855ace6..173d5ee265 100644 --- a/entity-view/api/src/main/java/com/blazebit/persistence/view/CorrelationBuilder.java +++ b/entity-view/api/src/main/java/com/blazebit/persistence/view/CorrelationBuilder.java @@ -9,7 +9,7 @@ import com.blazebit.persistence.FromProvider; import com.blazebit.persistence.JoinOnBuilder; -import javax.persistence.metamodel.EntityType; +import jakarta.persistence.metamodel.EntityType; /** * A builder for correlating a basis with an entity class. diff --git a/entity-view/api/src/main/java/com/blazebit/persistence/view/EntityViewManager.java b/entity-view/api/src/main/java/com/blazebit/persistence/view/EntityViewManager.java index 8edba18f16..38cf3bfcd8 100644 --- a/entity-view/api/src/main/java/com/blazebit/persistence/view/EntityViewManager.java +++ b/entity-view/api/src/main/java/com/blazebit/persistence/view/EntityViewManager.java @@ -12,7 +12,7 @@ import com.blazebit.persistence.view.change.SingularChangeModel; import com.blazebit.persistence.view.metamodel.ViewMetamodel; -import javax.persistence.EntityManager; +import jakarta.persistence.EntityManager; import java.util.Map; /** diff --git a/entity-view/api/src/main/java/com/blazebit/persistence/view/LockMode.java b/entity-view/api/src/main/java/com/blazebit/persistence/view/LockMode.java index 037d27410d..707d6593bc 100644 --- a/entity-view/api/src/main/java/com/blazebit/persistence/view/LockMode.java +++ b/entity-view/api/src/main/java/com/blazebit/persistence/view/LockMode.java @@ -22,12 +22,12 @@ public enum LockMode { */ OPTIMISTIC, /** - * The pessimistic read locking mode will acquire a {@link javax.persistence.LockModeType#PESSIMISTIC_READ} for the entity when reading the entity view. + * The pessimistic read locking mode will acquire a {@link jakarta.persistence.LockModeType#PESSIMISTIC_READ} for the entity when reading the entity view. * This lock mode is only useful within the bounds of a single transaction as the lock is bound to it. */ PESSIMISTIC_READ, /** - * The pessimistic write locking mode will acquire a {@link javax.persistence.LockModeType#PESSIMISTIC_WRITE} for the entity when reading the entity view. + * The pessimistic write locking mode will acquire a {@link jakarta.persistence.LockModeType#PESSIMISTIC_WRITE} for the entity when reading the entity view. * This lock mode is only useful within the bounds of a single transaction as the lock is bound to it. */ PESSIMISTIC_WRITE, diff --git a/entity-view/api/src/main/java/com/blazebit/persistence/view/MappingInverse.java b/entity-view/api/src/main/java/com/blazebit/persistence/view/MappingInverse.java index fa5d2b0609..e3869eaa11 100644 --- a/entity-view/api/src/main/java/com/blazebit/persistence/view/MappingInverse.java +++ b/entity-view/api/src/main/java/com/blazebit/persistence/view/MappingInverse.java @@ -5,8 +5,8 @@ package com.blazebit.persistence.view; -import javax.persistence.OneToMany; -import javax.persistence.OneToOne; +import jakarta.persistence.OneToMany; +import jakarta.persistence.OneToOne; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; diff --git a/entity-view/api/src/main/java/com/blazebit/persistence/view/OptimisticLockException.java b/entity-view/api/src/main/java/com/blazebit/persistence/view/OptimisticLockException.java index ecf53cab6b..d5da6fed20 100644 --- a/entity-view/api/src/main/java/com/blazebit/persistence/view/OptimisticLockException.java +++ b/entity-view/api/src/main/java/com/blazebit/persistence/view/OptimisticLockException.java @@ -11,7 +11,7 @@ * @author Christian Beikov * @since 1.2.0 */ -public class OptimisticLockException extends javax.persistence.OptimisticLockException { +public class OptimisticLockException extends jakarta.persistence.OptimisticLockException { /** * The entity view object that caused the exception. diff --git a/entity-view/api/src/main/java/com/blazebit/persistence/view/PostCommit.java b/entity-view/api/src/main/java/com/blazebit/persistence/view/PostCommit.java index d55018c6ec..f39e5988e3 100644 --- a/entity-view/api/src/main/java/com/blazebit/persistence/view/PostCommit.java +++ b/entity-view/api/src/main/java/com/blazebit/persistence/view/PostCommit.java @@ -5,7 +5,7 @@ package com.blazebit.persistence.view; -import javax.persistence.EntityManager; +import jakarta.persistence.EntityManager; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; diff --git a/entity-view/api/src/main/java/com/blazebit/persistence/view/PostCommitListener.java b/entity-view/api/src/main/java/com/blazebit/persistence/view/PostCommitListener.java index 71b83bf7f0..56177d0404 100644 --- a/entity-view/api/src/main/java/com/blazebit/persistence/view/PostCommitListener.java +++ b/entity-view/api/src/main/java/com/blazebit/persistence/view/PostCommitListener.java @@ -5,7 +5,7 @@ package com.blazebit.persistence.view; -import javax.persistence.EntityManager; +import jakarta.persistence.EntityManager; /** * A listener for getting a callback after committing a flush for an entity view. diff --git a/entity-view/api/src/main/java/com/blazebit/persistence/view/PostPersist.java b/entity-view/api/src/main/java/com/blazebit/persistence/view/PostPersist.java index bfee40aae0..46d51329e8 100644 --- a/entity-view/api/src/main/java/com/blazebit/persistence/view/PostPersist.java +++ b/entity-view/api/src/main/java/com/blazebit/persistence/view/PostPersist.java @@ -5,7 +5,7 @@ package com.blazebit.persistence.view; -import javax.persistence.EntityManager; +import jakarta.persistence.EntityManager; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; diff --git a/entity-view/api/src/main/java/com/blazebit/persistence/view/PostPersistEntityListener.java b/entity-view/api/src/main/java/com/blazebit/persistence/view/PostPersistEntityListener.java index 3b2bc52010..1960aa3d03 100644 --- a/entity-view/api/src/main/java/com/blazebit/persistence/view/PostPersistEntityListener.java +++ b/entity-view/api/src/main/java/com/blazebit/persistence/view/PostPersistEntityListener.java @@ -5,7 +5,7 @@ package com.blazebit.persistence.view; -import javax.persistence.EntityManager; +import jakarta.persistence.EntityManager; /** * A listener for getting a callback after persisting a creatable view. diff --git a/entity-view/api/src/main/java/com/blazebit/persistence/view/PostPersistListener.java b/entity-view/api/src/main/java/com/blazebit/persistence/view/PostPersistListener.java index 271fb74b09..5b57cc4ed0 100644 --- a/entity-view/api/src/main/java/com/blazebit/persistence/view/PostPersistListener.java +++ b/entity-view/api/src/main/java/com/blazebit/persistence/view/PostPersistListener.java @@ -5,7 +5,7 @@ package com.blazebit.persistence.view; -import javax.persistence.EntityManager; +import jakarta.persistence.EntityManager; /** * A listener for getting a callback after persisting a creatable view. diff --git a/entity-view/api/src/main/java/com/blazebit/persistence/view/PostRemove.java b/entity-view/api/src/main/java/com/blazebit/persistence/view/PostRemove.java index c9d147970d..29fbaf6b7a 100644 --- a/entity-view/api/src/main/java/com/blazebit/persistence/view/PostRemove.java +++ b/entity-view/api/src/main/java/com/blazebit/persistence/view/PostRemove.java @@ -5,7 +5,7 @@ package com.blazebit.persistence.view; -import javax.persistence.EntityManager; +import jakarta.persistence.EntityManager; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; diff --git a/entity-view/api/src/main/java/com/blazebit/persistence/view/PostRemoveListener.java b/entity-view/api/src/main/java/com/blazebit/persistence/view/PostRemoveListener.java index f054e45a7a..7095b2076a 100644 --- a/entity-view/api/src/main/java/com/blazebit/persistence/view/PostRemoveListener.java +++ b/entity-view/api/src/main/java/com/blazebit/persistence/view/PostRemoveListener.java @@ -5,7 +5,7 @@ package com.blazebit.persistence.view; -import javax.persistence.EntityManager; +import jakarta.persistence.EntityManager; /** * A listener for getting a callback after a view is removed. diff --git a/entity-view/api/src/main/java/com/blazebit/persistence/view/PostRollback.java b/entity-view/api/src/main/java/com/blazebit/persistence/view/PostRollback.java index 84b26deb70..09478c786e 100644 --- a/entity-view/api/src/main/java/com/blazebit/persistence/view/PostRollback.java +++ b/entity-view/api/src/main/java/com/blazebit/persistence/view/PostRollback.java @@ -5,7 +5,7 @@ package com.blazebit.persistence.view; -import javax.persistence.EntityManager; +import jakarta.persistence.EntityManager; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; diff --git a/entity-view/api/src/main/java/com/blazebit/persistence/view/PostRollbackListener.java b/entity-view/api/src/main/java/com/blazebit/persistence/view/PostRollbackListener.java index 5c28186c5a..496e3b7738 100644 --- a/entity-view/api/src/main/java/com/blazebit/persistence/view/PostRollbackListener.java +++ b/entity-view/api/src/main/java/com/blazebit/persistence/view/PostRollbackListener.java @@ -5,7 +5,7 @@ package com.blazebit.persistence.view; -import javax.persistence.EntityManager; +import jakarta.persistence.EntityManager; /** * A listener for getting a callback after rolling back a flush for an entity view. diff --git a/entity-view/api/src/main/java/com/blazebit/persistence/view/PostUpdate.java b/entity-view/api/src/main/java/com/blazebit/persistence/view/PostUpdate.java index 9c66d13d0f..734df978f5 100644 --- a/entity-view/api/src/main/java/com/blazebit/persistence/view/PostUpdate.java +++ b/entity-view/api/src/main/java/com/blazebit/persistence/view/PostUpdate.java @@ -5,7 +5,7 @@ package com.blazebit.persistence.view; -import javax.persistence.EntityManager; +import jakarta.persistence.EntityManager; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; diff --git a/entity-view/api/src/main/java/com/blazebit/persistence/view/PostUpdateListener.java b/entity-view/api/src/main/java/com/blazebit/persistence/view/PostUpdateListener.java index 78741e4944..0ae1552e31 100644 --- a/entity-view/api/src/main/java/com/blazebit/persistence/view/PostUpdateListener.java +++ b/entity-view/api/src/main/java/com/blazebit/persistence/view/PostUpdateListener.java @@ -5,7 +5,7 @@ package com.blazebit.persistence.view; -import javax.persistence.EntityManager; +import jakarta.persistence.EntityManager; /** * A listener for getting a callback after updating an updatable view. diff --git a/entity-view/api/src/main/java/com/blazebit/persistence/view/PrePersist.java b/entity-view/api/src/main/java/com/blazebit/persistence/view/PrePersist.java index c1a63db93b..8b2168c3e3 100644 --- a/entity-view/api/src/main/java/com/blazebit/persistence/view/PrePersist.java +++ b/entity-view/api/src/main/java/com/blazebit/persistence/view/PrePersist.java @@ -5,14 +5,14 @@ package com.blazebit.persistence.view; -import javax.persistence.EntityManager; +import jakarta.persistence.EntityManager; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** - * Annotation to mark a method to be executed before a call to {@link javax.persistence.EntityManager#persist(Object)} when flushing + * Annotation to mark a method to be executed before a call to {@link jakarta.persistence.EntityManager#persist(Object)} when flushing * the creatable entity view containing this method via {@link EntityViewManager#save(EntityManager, Object)}. * A method annotated with @PrePersist may optionally have the following parameters *