Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWill Dazey2018-02-22 18:56:39 +0000
committerWill Dazey2018-02-22 18:56:39 +0000
commitdffd2942f3dcc2e34027c4ef9ca9f2e0183b3089 (patch)
tree57d653689317bbf1d19e0011792957c9ee1516f0
parente6310d8f04e72e0be74069c3f2b8b59579670652 (diff)
downloadeclipselink.runtime-dffd2942f3dcc2e34027c4ef9ca9f2e0183b3089.tar.gz
eclipselink.runtime-dffd2942f3dcc2e34027c4ef9ca9f2e0183b3089.tar.xz
eclipselink.runtime-dffd2942f3dcc2e34027c4ef9ca9f2e0183b3089.zip
Bug 529602: Fix failing DBWS/SDO tests
Signed-off-by: Will Dazey <dazeydev.3@gmail.com> Reviewed-by: Lukas Jungmann <lukas.jungmann@oracle.com>
-rw-r--r--foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/databaseaccess/DatabasePlatform.java13
-rw-r--r--foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/databaseaccess/DatasourcePlatform.java17
-rw-r--r--foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/descriptors/ObjectBuilder.java5
3 files changed, 18 insertions, 17 deletions
diff --git a/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/databaseaccess/DatabasePlatform.java b/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/databaseaccess/DatabasePlatform.java
index 301a018b27..f4b1c4cfbe 100644
--- a/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/databaseaccess/DatabasePlatform.java
+++ b/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/databaseaccess/DatabasePlatform.java
@@ -24,8 +24,6 @@
* - 458877 : Add national character support
* 02/23/2015-2.6 Dalia Abo Sheasha
* - 460607: Change DatabasePlatform StoredProcedureTerminationToken to be configurable
- * 02/14/2018-2.7 Will Dazey
- * - 529602: Added support for CLOBs in DELETE statements for Oracle
******************************************************************************/
package org.eclipse.persistence.internal.databaseaccess;
@@ -3518,15 +3516,4 @@ public class DatabasePlatform extends DatasourcePlatform {
public String getConnectionUserName() {
throw new UnsupportedOperationException("Connection user name is not supported.");
}
-
- /**
- * INTERNAL:
- * Override this method if the platform needs to use a custom function based on the DatabaseField
- * @return An expression for the given field set equal to a parameter matching the field
- */
- public Expression createExpressionFor(DatabaseField field, Expression builder) {
- Expression subExp1 = builder.getField(field);
- Expression subExp2 = builder.getParameter(field);
- return subExp1.equal(subExp2);
- }
}
diff --git a/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/databaseaccess/DatasourcePlatform.java b/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/databaseaccess/DatasourcePlatform.java
index b6fb00fd61..7fbb6629ac 100644
--- a/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/databaseaccess/DatasourcePlatform.java
+++ b/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/databaseaccess/DatasourcePlatform.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 1998, 2017 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
* which accompanies this distribution.
@@ -12,7 +12,9 @@
* 09/29/2016-2.7 Tomas Kraus
* - 426852: @GeneratedValue(strategy=GenerationType.IDENTITY) support in Oracle 12c
* 09/14/2017-2.6 Will Dazey
- * - 522312: Add the eclipselink.sequencing.start-sequence-at-nextval property
+ * - 522312: Add the eclipselink.sequencing.start-sequence-at-nextval property
+ * 02/20/2018-2.7 Will Dazey
+ * - 529602: Added support for CLOBs in DELETE statements for Oracle
******************************************************************************/
package org.eclipse.persistence.internal.databaseaccess;
@@ -28,6 +30,7 @@ import java.util.Vector;
import org.eclipse.persistence.descriptors.DescriptorQueryManager;
import org.eclipse.persistence.exceptions.ConversionException;
import org.eclipse.persistence.exceptions.ValidationException;
+import org.eclipse.persistence.expressions.Expression;
import org.eclipse.persistence.expressions.ExpressionOperator;
import org.eclipse.persistence.internal.helper.ClassConstants;
import org.eclipse.persistence.internal.helper.ConversionManager;
@@ -1061,4 +1064,14 @@ public class DatasourcePlatform implements Platform {
final Session session, final String defaultIdentityGenerator, final Set<String> tableNames) {
}
+ /**
+ * INTERNAL:
+ * Override this method if the platform needs to use a custom function based on the DatabaseField
+ * @return An expression for the given field set equal to a parameter matching the field
+ */
+ public Expression createExpressionFor(DatabaseField field, Expression builder) {
+ Expression subExp1 = builder.getField(field);
+ Expression subExp2 = builder.getParameter(field);
+ return subExp1.equal(subExp2);
+ }
}
diff --git a/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/descriptors/ObjectBuilder.java b/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/descriptors/ObjectBuilder.java
index c8e6c1a853..5bda6a2f7e 100644
--- a/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/descriptors/ObjectBuilder.java
+++ b/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/descriptors/ObjectBuilder.java
@@ -21,7 +21,7 @@
* - 485984: Retrieve FetchGroup info along with getReference() from cache
* 08/07/2016-2.7 Dalia Abo Sheasha
* - 499335: Multiple embeddable fields can't reference same object
- * 02/14/2018-2.7 Will Dazey
+ * 02/20/2018-2.7 Will Dazey
* - 529602: Added support for CLOBs in DELETE statements for Oracle
******************************************************************************/
package org.eclipse.persistence.internal.descriptors;
@@ -49,6 +49,7 @@ import org.eclipse.persistence.indirection.ValueHolderInterface;
import org.eclipse.persistence.internal.core.descriptors.CoreObjectBuilder;
import org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor;
import org.eclipse.persistence.internal.databaseaccess.DatabasePlatform;
+import org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform;
import org.eclipse.persistence.internal.databaseaccess.Platform;
import org.eclipse.persistence.internal.expressions.*;
import org.eclipse.persistence.internal.helper.*;
@@ -2918,7 +2919,7 @@ public class ObjectBuilder extends CoreObjectBuilder<AbstractRecord, AbstractSes
if(null != primaryKeyFields) {
for (int index = 0; index < primaryKeyFields.size(); index++) {
DatabaseField primaryKeyField = (DatabaseField)primaryKeyFields.get(index);
- subExpression = session.getPlatform().createExpressionFor(primaryKeyField, builder);
+ subExpression = ((DatasourcePlatform)session.getDatasourcePlatform()).createExpressionFor(primaryKeyField, builder);
if (expression == null) {
expression = subExpression;

Back to the top