diff --git a/.travis.yml b/.travis.yml
index 4292bc6ee9..e0a1882279 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -7,6 +7,7 @@ cache:
- '$HOME/.m2/repository'
before_install:
- sh -c "if [ '$RDBMS' = 'firebird' ]; then sh travis/before_install_firebird.sh; fi"
+ - sh -c "if [ '$JDK' = '10' ]; then unset _JAVA_OPTIONS && . ./travis/install_jdk_10.sh; fi"
install:
- sh -c "if [ '$LATEST_MAVEN' = 'true' ]; then sh travis/install_latest_maven.sh; fi"
before_script:
@@ -56,7 +57,7 @@ matrix:
sudo: true
services:
- docker
- - env: JPAPROVIDER=hibernate-5.2 RDBMS=h2 SPRING_DATA=spring-data-2.0.x
+ - env: JPAPROVIDER=hibernate-5.2 RDBMS=h2 SPRING_DATA=spring-data-2.0.x DELTASPIKE=deltaspike-1.8
jdk: oraclejdk8
# - env: JPAPROVIDER=hibernate-5.2 RDBMS=sqlite
# jdk: oraclejdk8
@@ -102,7 +103,7 @@ matrix:
# eclipselink
################################################
- env: JPAPROVIDER=eclipselink RDBMS=h2
- jdk: openjdk7
+ jdk: oraclejdk8
# - env: JPAPROVIDER=eclipselink RDBMS=mysql
# dist: trusty
# sudo: required
@@ -157,6 +158,74 @@ matrix:
# - env: JPAPROVIDER=openjpa RDBMS=firebird
# sudo: true
+################################################
+# hibernate-5.3
+################################################
+# - env: JPAPROVIDER=hibernate-5.3 RDBMS=h2
+# jdk: oraclejdk8
+# - env: JPAPROVIDER=hibernate-5.3 RDBMS=mysql
+# jdk: oraclejdk8
+# dist: trusty
+# sudo: required
+# - env: JPAPROVIDER=hibernate-5.3 RDBMS=postgresql
+# jdk: oraclejdk8
+# addons:
+# postgresql: "9.3"
+# - env: JPAPROVIDER=hibernate-5.3 RDBMS=mssql
+# jdk: oraclejdk8
+# sudo: true
+# services:
+# - docker
+# - env: JPAPROVIDER=hibernate-5.3 RDBMS=db2
+# jdk: oraclejdk8
+# sudo: true
+# services:
+# - docker
+# - env: JPAPROVIDER=hibernate-5.3 RDBMS=oracle
+# jdk: oraclejdk8
+# sudo: true
+# services:
+# - docker
+# - env: JPAPROVIDER=hibernate-5.3 RDBMS=sqlite
+# jdk: oraclejdk8
+# - env: JPAPROVIDER=hibernate-5.3 RDBMS=firebird
+# jdk: oraclejdk8
+# sudo: true
+
+################################################
+# datanucleus-5.1
+################################################
+# - env: JPAPROVIDER=datanucleus-5.1 RDBMS=h2
+# jdk: oraclejdk8
+# - env: JPAPROVIDER=datanucleus-5.1 RDBMS=mysql
+# jdk: oraclejdk8
+# dist: trusty
+# sudo: required
+# - env: JPAPROVIDER=datanucleus-5.1 RDBMS=postgresql
+# jdk: oraclejdk8
+# addons:
+# postgresql: "9.3"
+# - env: JPAPROVIDER=datanucleus-5.1 RDBMS=mssql
+# jdk: oraclejdk8
+# sudo: true
+# services:
+# - docker
+# - env: JPAPROVIDER=datanucleus-5.1 RDBMS=db2
+# jdk: oraclejdk8
+# sudo: true
+# services:
+# - docker
+# - env: JPAPROVIDER=datanucleus-5.1 RDBMS=oracle
+# jdk: oraclejdk8
+# sudo: true
+# services:
+# - docker
+# - env: JPAPROVIDER=datanucleus-5.1 RDBMS=sqlite
+# jdk: oraclejdk8
+# - env: JPAPROVIDER=datanucleus-5.1 RDBMS=firebird
+# jdk: oraclejdk8
+# sudo: true
+
################################################
# hibernate-5.1
################################################
@@ -229,13 +298,13 @@ matrix:
# hibernate-4.3
################################################
- env: JPAPROVIDER=hibernate-4.3 RDBMS=h2
- jdk: openjdk7
+ jdk: oraclejdk8
- env: JPAPROVIDER=hibernate-4.3 RDBMS=mysql
- jdk: openjdk7
+ jdk: oraclejdk8
dist: trusty
sudo: required
- env: JPAPROVIDER=hibernate-4.3 RDBMS=postgresql
- jdk: openjdk7
+ jdk: oraclejdk8
addons:
postgresql: "9.3"
- env: JPAPROVIDER=hibernate-4.3 RDBMS=mssql
@@ -244,7 +313,7 @@ matrix:
services:
- docker
- env: JPAPROVIDER=hibernate-4.3 RDBMS=db2
- jdk: openjdk7
+ jdk: oraclejdk8
sudo: true
services:
- docker
@@ -262,13 +331,13 @@ matrix:
# hibernate-4.2
################################################
- env: JPAPROVIDER=hibernate RDBMS=h2
- jdk: openjdk7
+ jdk: oraclejdk8
- env: JPAPROVIDER=hibernate RDBMS=mysql
- jdk: openjdk7
+ jdk: oraclejdk8
dist: trusty
sudo: required
- env: JPAPROVIDER=hibernate RDBMS=postgresql
- jdk: openjdk7
+ jdk: oraclejdk8
addons:
postgresql: "9.3"
- env: JPAPROVIDER=hibernate RDBMS=mssql
@@ -277,7 +346,7 @@ matrix:
services:
- docker
- env: JPAPROVIDER=hibernate RDBMS=db2
- jdk: openjdk7
+ jdk: oraclejdk8
sudo: true
services:
- docker
@@ -334,15 +403,124 @@ matrix:
################################################
# JDK 9
################################################
-# JDK 9 - Not going to work until javassist is fixed
+ - env: JPAPROVIDER=hibernate-5.2 RDBMS=h2 JDK=10 LATEST_MAVEN=true
- env: JPAPROVIDER=hibernate-5.2 RDBMS=h2 JDK=9 LATEST_MAVEN=true
addons:
apt:
packages:
- oracle-java9-installer
jdk: oraclejdk9
+ - env: JPAPROVIDER=datanucleus-5 RDBMS=h2 JDK=9 LATEST_MAVEN=true
+ addons:
+ apt:
+ packages:
+ - oracle-java9-installer
+ jdk: oraclejdk9
+ - env: JPAPROVIDER=eclipselink RDBMS=h2 JDK=9 LATEST_MAVEN=true
+ addons:
+ apt:
+ packages:
+ - oracle-java9-installer
+ jdk: oraclejdk9
+ - env: JPAPROVIDER=hibernate-5.3 RDBMS=h2 JDK=9 LATEST_MAVEN=true
+ addons:
+ apt:
+ packages:
+ - oracle-java9-installer
+ jdk: oraclejdk9
+ - env: JPAPROVIDER=datanucleus-5.1 RDBMS=h2 JDK=9 LATEST_MAVEN=true
+ addons:
+ apt:
+ packages:
+ - oracle-java9-installer
+ jdk: oraclejdk9
+ - env: JPAPROVIDER=hibernate-5.1 RDBMS=h2 JDK=9 LATEST_MAVEN=true
+ addons:
+ apt:
+ packages:
+ - oracle-java9-installer
+ jdk: oraclejdk9
+ - env: JPAPROVIDER=hibernate-5.0 RDBMS=h2 JDK=9 LATEST_MAVEN=true
+ addons:
+ apt:
+ packages:
+ - oracle-java9-installer
+ jdk: oraclejdk9
+ - env: JPAPROVIDER=hibernate-4.3 RDBMS=h2 JDK=9 LATEST_MAVEN=true
+ addons:
+ apt:
+ packages:
+ - oracle-java9-installer
+ jdk: oraclejdk9
+ - env: JPAPROVIDER=hibernate-4.2 RDBMS=h2 JDK=9 LATEST_MAVEN=true
+ addons:
+ apt:
+ packages:
+ - oracle-java9-installer
+ jdk: oraclejdk9
+ - env: JPAPROVIDER=datanucleus-4 RDBMS=h2 JDK=9 LATEST_MAVEN=true
+ addons:
+ apt:
+ packages:
+ - oracle-java9-installer
+ jdk: oraclejdk9
allow_failures:
+ - env: JPAPROVIDER=hibernate-5.2 RDBMS=h2 JDK=10 LATEST_MAVEN=true
- env: JPAPROVIDER=hibernate-5.2 RDBMS=h2 JDK=9 LATEST_MAVEN=true
+ addons:
+ apt:
+ packages:
+ - oracle-java9-installer
+ jdk: oraclejdk9
+ - env: JPAPROVIDER=datanucleus-5 RDBMS=h2 JDK=9 LATEST_MAVEN=true
+ addons:
+ apt:
+ packages:
+ - oracle-java9-installer
+ jdk: oraclejdk9
+ - env: JPAPROVIDER=eclipselink RDBMS=h2 JDK=9 LATEST_MAVEN=true
+ addons:
+ apt:
+ packages:
+ - oracle-java9-installer
+ jdk: oraclejdk9
+ - env: JPAPROVIDER=hibernate-5.3 RDBMS=h2 JDK=9 LATEST_MAVEN=true
+ addons:
+ apt:
+ packages:
+ - oracle-java9-installer
+ jdk: oraclejdk9
+ - env: JPAPROVIDER=datanucleus-5.1 RDBMS=h2 JDK=9 LATEST_MAVEN=true
+ addons:
+ apt:
+ packages:
+ - oracle-java9-installer
+ jdk: oraclejdk9
+ - env: JPAPROVIDER=hibernate-5.1 RDBMS=h2 JDK=9 LATEST_MAVEN=true
+ addons:
+ apt:
+ packages:
+ - oracle-java9-installer
+ jdk: oraclejdk9
+ - env: JPAPROVIDER=hibernate-5.0 RDBMS=h2 JDK=9 LATEST_MAVEN=true
+ addons:
+ apt:
+ packages:
+ - oracle-java9-installer
+ jdk: oraclejdk9
+ - env: JPAPROVIDER=hibernate-4.3 RDBMS=h2 JDK=9 LATEST_MAVEN=true
+ addons:
+ apt:
+ packages:
+ - oracle-java9-installer
+ jdk: oraclejdk9
+ - env: JPAPROVIDER=hibernate-4.2 RDBMS=h2 JDK=9 LATEST_MAVEN=true
+ addons:
+ apt:
+ packages:
+ - oracle-java9-installer
+ jdk: oraclejdk9
+ - env: JPAPROVIDER=datanucleus-4 RDBMS=h2 JDK=9 LATEST_MAVEN=true
addons:
apt:
packages:
diff --git a/README.md b/README.md
index e2d0fa6a02..ab950d83bd 100644
--- a/README.md
+++ b/README.md
@@ -115,6 +115,78 @@ Java EE archetype:
mvn archetype:generate "-DarchetypeGroupId=com.blazebit" "-DarchetypeArtifactId=blaze-persistence-archetype-java-ee-sample" "-DarchetypeVersion=1.2.0-Alpha4"
```
+## 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.
+
+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 will even remove 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.
+
+```xml
+
+ javax.xml.bind
+ jaxb-api
+ 2.2.11
+
+
+ com.sun.xml.bind
+ jaxb-core
+ 2.2.11
+
+
+ com.sun.xml.bind
+ jaxb-impl
+ 2.2.11
+
+
+ javax.transaction
+ javax.transaction-api
+ 1.2
+
+ provided
+
+
+ javax.activation
+ activation
+ 1.1.1
+
+ provided
+
+
+ javax.annotation
+ javax.annotation-api
+ 1.3.2
+
+ provided
+
+```
+
+The `javax.transaction` and `javax.activation` dependencies are especially relevant for the JPA metamodel generation.
+
+## 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.
+
+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, 5.1, 5.2, 5.3 (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
+Entity View Spring integration | Spring 4.3 | 4.3, 5.0
+DeltaSpike Data integration | DeltaSpike 1.7 | 1.7, 1.8
+Spring Data integration | Spring Data 1.11 | 1.11, 2.0
+Spring Data Rest integration | Spring Data 1.11, Spring MVC 4.3 | Spring Data 1.11 + Spring MVC 4.3, Spring Data 2.0 + Spring MVC 5.0
+
## Manual setup
For compiling you will only need API artifacts and for the runtime you need impl and integration artifacts.
@@ -218,6 +290,17 @@ Blaze-Persistence DeltaSpike Data integration
Blaze-Persistence JPA provider integration module dependencies
+Hibernate 5.3
+
+```xml
+
+ com.blazebit
+ blaze-persistence-integration-hibernate-5.3
+ ${blaze-persistence.version}
+ runtime
+
+```
+
Hibernate 5.2
```xml
@@ -262,7 +345,18 @@ Hibernate 4.2
```
-Datanucleus
+Datanucleus 5.1
+
+```xml
+
+ com.blazebit
+ blaze-persistence-integration-datanucleus-5.1
+ ${blaze-persistence.version}
+ runtime
+
+```
+
+Datanucleus 4 and 5
```xml
@@ -482,15 +576,17 @@ 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.
-To test a specific combination, you need to activate at least 3 profiles
+To test a specific combination, you need to activate at least 4 profiles
* One of the JPA provider profiles
+** `hibernate-5.3`
** `hibernate-5.2`
** `hibernate-5.1`
** `hibernate-5.0`
** `hibernate-4.3`
** `hibernate`
** `eclipselink`
+** `datanucleus-5.1`
** `datanucleus-5`
** `datanucleus-4`
** `openjpa`
@@ -506,6 +602,9 @@ To test a specific combination, you need to activate at least 3 profiles
* A Spring data profile
** `spring-data-2.0.x`
** `spring-data-1.11.x`
+* A Deltaspike profile
+** `deltaspike-1.7`
+** `deltaspike-1.8`
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.
@@ -534,6 +633,7 @@ After that, the entities in the project *core/testsuite* have to be enhanced. Th
* DataNucleus 4: `mvn -P "datanucleus-4" -pl core/testsuite datanucleus:enhance`
* DataNucleus 5: `mvn -P "datanucleus-5" -pl core/testsuite datanucleus:enhance`
+* DataNucleus 5.1: `mvn -P "datanucleus-5.1" -pl core/testsuite datanucleus:enhance`
After doing that, you should be able to execute any test in IntelliJ.
diff --git a/build.sh b/build.sh
index 232130ee94..f0bfa95aae 100755
--- a/build.sh
+++ b/build.sh
@@ -24,7 +24,7 @@ if [ "$TRAVIS_REPO_SLUG" == "Blazebit/blaze-persistence" ] &&
[ "$TRAVIS_BRANCH" == "master" ] &&
[ "$JPAPROVIDER" == "hibernate-5.2" ] &&
[ "$RDBMS" == "h2" ]; then
- exec ${MVN_BIN} -P ${JPAPROVIDER},${RDBMS},${SPRING_DATA:-spring-data-1.11.x} install
+ exec ${MVN_BIN} -P ${JPAPROVIDER},${RDBMS},${SPRING_DATA:-spring-data-1.11.x},${DELTASPIKE:-deltaspike-1.7} install
else
if [ "$TRAVIS_REPO_SLUG" == "Blazebit/blaze-persistence" ] &&
[ "$TRAVIS_BRANCH" == "master" ] &&
@@ -38,5 +38,5 @@ else
: # do nothing right now
fi
- eval exec ${MVN_BIN} -P ${JPAPROVIDER},${RDBMS},${SPRING_DATA:-spring-data-1.11.x} install --projects "core/testsuite,entity-view/testsuite,jpa-criteria/testsuite" -am $PROPERTIES
+ eval exec ${MVN_BIN} -P ${JPAPROVIDER},${RDBMS},${SPRING_DATA:-spring-data-1.11.x},${DELTASPIKE:-deltaspike-1.7} install --projects "core/testsuite,entity-view/testsuite,jpa-criteria/testsuite" -am $PROPERTIES
fi
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 b230776856..0c020b3455 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
@@ -116,6 +116,7 @@ protected Query getQuery() {
QuerySpecification querySpecification = new CTEQuerySpecification(
this,
query,
+ parameterManager.getParameters(),
parameterListNames,
limit,
offset,
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 03a3942dd8..b28c4531c5 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
@@ -1551,7 +1551,7 @@ protected TypedQuery getTypedQuery() {
boolean shouldRenderCteNodes = renderCteNodes(false);
List ctes = shouldRenderCteNodes ? getCteNodes(baseQuery, false) : Collections.EMPTY_LIST;
QuerySpecification querySpecification = new CustomQuerySpecification(
- this, baseQuery, parameterListNames, limit, offset, keyRestrictedLeftJoinAliases, entityFunctionNodes, mainQuery.cteManager.isRecursive(), ctes, shouldRenderCteNodes
+ this, baseQuery, parameterManager.getParameters(), parameterListNames, limit, offset, keyRestrictedLeftJoinAliases, entityFunctionNodes, mainQuery.cteManager.isRecursive(), ctes, shouldRenderCteNodes
);
TypedQuery query = new CustomSQLTypedQuery(
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 3aa109910b..56f2caecad 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
@@ -150,6 +150,7 @@ private QuerySpecification getQuerySpecification(Query baseQuery, Query exam
this,
baseQuery,
exampleQuery,
+ parameterManager.getParameters(),
parameterListNames,
mainQuery.cteManager.isRecursive(),
ctes,
@@ -167,6 +168,7 @@ private QuerySpecification getQuerySpecification(Query baseQuery, Query exam
this,
baseQuery,
exampleQuery,
+ parameterManager.getParameters(),
parameterListNames,
mainQuery.cteManager.isRecursive(),
ctes,
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 7f3bb8c3b5..5fcc260c3a 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
@@ -201,6 +201,7 @@ private QuerySpecification getQuerySpecification(Query baseQuery, Query exam
this,
baseQuery,
exampleQuery,
+ parameterManager.getParameters(),
parameterListNames,
keyRestrictedLeftJoinAliases,
entityFunctionNodes,
@@ -219,6 +220,7 @@ private QuerySpecification getQuerySpecification(Query baseQuery, Query exam
this,
baseQuery,
exampleQuery,
+ parameterManager.getParameters(),
parameterListNames,
keyRestrictedLeftJoinAliases,
entityFunctionNodes,
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 9ea1f06202..5c045a3a77 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
@@ -183,6 +183,7 @@ protected Query getQuery(Map includedModification
this,
query,
getCountExampleQuery(),
+ parameterManager.getParameters(),
parameterListNames,
mainQuery.cteManager.isRecursive(),
ctes,
@@ -346,7 +347,7 @@ protected TypedQuery> getExecuteWithReturningQuery(TypedQ
boolean shouldRenderCteNodes = renderCteNodes(false);
List ctes = shouldRenderCteNodes ? getCteNodes(baseQuery, false) : Collections.EMPTY_LIST;
QuerySpecification querySpecification = new ReturningModificationQuerySpecification(
- this, baseQuery, exampleQuery, parameterListNames, mainQuery.cteManager.isRecursive(), ctes, shouldRenderCteNodes, returningColumns, objectBuilder
+ this, baseQuery, exampleQuery, parameterManager.getParameters(), parameterListNames, mainQuery.cteManager.isRecursive(), ctes, shouldRenderCteNodes, returningColumns, objectBuilder
);
CustomReturningSQLTypedQuery query = new CustomReturningSQLTypedQuery(
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 723d5d320e..a3cf40102b 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
@@ -248,6 +248,7 @@ private QuerySpecification getQuerySpecification(Query baseQuery, Query exam
this,
baseQuery,
exampleQuery,
+ parameterManager.getParameters(),
parameterListNames,
mainQuery.cteManager.isRecursive(),
ctes,
@@ -267,6 +268,7 @@ private QuerySpecification getQuerySpecification(Query baseQuery, Query exam
this,
baseQuery,
exampleQuery,
+ parameterManager.getParameters(),
parameterListNames,
mainQuery.cteManager.isRecursive(),
ctes,
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 80351b2b5a..317a6c389f 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
@@ -269,6 +269,7 @@ protected TypedQuery getTypedQuery() {
setOperationManager.getOperator(),
getOrderByElements(),
setOperationManager.isNested(),
+ parameterManager.getParameters(),
parameterListNames,
limit,
offset,
@@ -299,6 +300,8 @@ protected TypedQuery getTypedQuery() {
}
}
+ parameterManager.parameterizeQuery(query);
+
return applyObjectBuilder(query);
}
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 7dc7640f0f..c7c910c77e 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
@@ -173,6 +173,7 @@ protected Query getQuery(Map includedModification
this,
query,
getCountExampleQuery(),
+ parameterManager.getParameters(),
parameterListNames,
keyRestrictedLeftJoinAliases,
entityFunctionNodes,
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
new file mode 100644
index 0000000000..109a0774f4
--- /dev/null
+++ b/core/impl/src/main/java/com/blazebit/persistence/impl/ExtendedParameter.java
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2014 - 2018 Blazebit.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.blazebit.persistence.impl;
+
+import javax.persistence.Parameter;
+
+/**
+ * @author Christian Beikov
+ * @since 1.2.0
+ */
+public interface ExtendedParameter extends Parameter {
+
+ public boolean isCollectionValued();
+
+}
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 95c8869b22..6121b05990 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
@@ -38,12 +38,14 @@
import com.blazebit.persistence.impl.transform.ExpressionTransformerGroup;
import com.blazebit.persistence.parser.util.JpaMetamodelUtils;
+import javax.persistence.Parameter;
import javax.persistence.TypedQuery;
import javax.persistence.metamodel.Attribute;
import java.util.AbstractMap;
import java.util.ArrayList;
import java.util.Collections;
import java.util.EnumSet;
+import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
@@ -176,7 +178,7 @@ private TypedQuery getCountQuery(String countQueryString, Class result
boolean shouldRenderCteNodes = renderCteNodes(false);
List ctes = shouldRenderCteNodes ? getCteNodes(baseQuery, false) : Collections.EMPTY_LIST;
QuerySpecification querySpecification = new CustomQuerySpecification(
- this, baseQuery, parameterListNames, null, null, keyRestrictedLeftJoinAliases, entityFunctionNodes, mainQuery.cteManager.isRecursive(), ctes, shouldRenderCteNodes
+ this, baseQuery, parameterManager.getParameters(), parameterListNames, null, null, keyRestrictedLeftJoinAliases, entityFunctionNodes, mainQuery.cteManager.isRecursive(), ctes, shouldRenderCteNodes
);
TypedQuery countQuery = new CustomSQLTypedQuery(
@@ -372,7 +374,7 @@ private Map.Entry, KeysetExtractionObjectBuilder> getObjectQuer
boolean shouldRenderCteNodes = renderCteNodes(false);
List ctes = shouldRenderCteNodes ? getCteNodes(baseQuery, false) : Collections.EMPTY_LIST;
QuerySpecification querySpecification = new CustomQuerySpecification(
- this, baseQuery, parameterListNames, null, null, keyRestrictedLeftJoinAliases, entityFunctionNodes, mainQuery.cteManager.isRecursive(), ctes, shouldRenderCteNodes
+ this, baseQuery, parameterManager.getParameters(), parameterListNames, null, null, keyRestrictedLeftJoinAliases, entityFunctionNodes, mainQuery.cteManager.isRecursive(), ctes, shouldRenderCteNodes
);
query = new CustomSQLTypedQuery(
@@ -425,7 +427,7 @@ private TypedQuery