From 405af701faf3a32a95144b37604db32203546113 Mon Sep 17 00:00:00 2001 From: Radek Felcman Date: Fri, 13 Oct 2023 16:01:14 +0200 Subject: [PATCH] JPA test fix Signed-off-by: Radek Felcman --- .../persistence/internal/sessions/UnitOfWorkImpl.java | 9 --------- .../mappings/converters/TypeConversionConverter.java | 2 +- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sessions/UnitOfWorkImpl.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sessions/UnitOfWorkImpl.java index 0e892587481..cccb1fd1d58 100644 --- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sessions/UnitOfWorkImpl.java +++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sessions/UnitOfWorkImpl.java @@ -3162,15 +3162,6 @@ public boolean isDead() { return this.lifecycle == Death; } - /** - * INTERNAL: - * Return if this session is a database session. - */ - @Override - public boolean isDatabaseSession() { - return true; - } - /** * PUBLIC: * Return whether the session currently has a database transaction in progress. diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/mappings/converters/TypeConversionConverter.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/mappings/converters/TypeConversionConverter.java index f74777bda79..bd8410701bc 100644 --- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/mappings/converters/TypeConversionConverter.java +++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/mappings/converters/TypeConversionConverter.java @@ -210,7 +210,7 @@ public void setObjectClassName(String objectClassName) { @Override public Object convertObjectValueToDataValue(Object attributeValue, Session session) { try { - if (session.isDatabaseSession()) { + if (session.isConnected()) { //Should handle conversions where DB connection is needed like String -> java.sql.Clob return session.getDatasourcePlatform().convertObject(attributeValue, getDataClass(), (AbstractSession)session); } else {