geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dschnei...@apache.org
Subject [geode] branch develop updated: GEODE-5969: remove value-contains-primary-key from jdbc-mapping (#2765)
Date Fri, 02 Nov 2018 21:37:23 GMT
This is an automated email from the ASF dual-hosted git repository.

dschneider pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git


The following commit(s) were added to refs/heads/develop by this push:
     new 834ab26  GEODE-5969: remove value-contains-primary-key from jdbc-mapping (#2765)
834ab26 is described below

commit 834ab26688575b58f6041b995b8ab4aa1dea23c4
Author: Darrel Schneider <dschneider@pivotal.io>
AuthorDate: Fri Nov 2 14:37:12 2018 -0700

    GEODE-5969: remove value-contains-primary-key from jdbc-mapping (#2765)
---
 .../jdbc/ClassWithSupportedPdxFields.java          | 20 ++++-
 .../org/apache/geode/connectors/jdbc/Employee.java | 10 ++-
 .../jdbc/JdbcAsyncWriterIntegrationTest.java       |  2 +-
 .../geode/connectors/jdbc/JdbcDistributedTest.java | 34 ++++-----
 .../connectors/jdbc/JdbcLoaderIntegrationTest.java | 11 +--
 .../connectors/jdbc/JdbcWriterIntegrationTest.java |  2 +-
 .../jdbc/internal/TestConfigService.java           |  2 +-
 .../cli/CreateMappingCommandDUnitTest.java         | 46 ------------
 .../cli/DescribeMappingCommandDUnitTest.java       |  6 +-
 .../cli/DestroyMappingCommandDunitTest.java        |  2 -
 .../cli/JdbcClusterConfigDistributedTest.java      |  3 +-
 .../internal/cli/ListMappingCommandDUnitTest.java  |  4 +-
 .../cli/CreateMappingCommandIntegrationTest.java   | 12 +--
 .../cli/DestroyMappingCommandIntegrationTest.java  |  2 +-
 .../jdbc/internal/SqlToPdxInstanceCreator.java     |  9 +--
 .../jdbc/internal/cli/CreateMappingCommand.java    |  8 +-
 .../jdbc/internal/cli/DescribeMappingCommand.java  |  2 -
 .../jdbc/internal/configuration/RegionMapping.java | 24 +-----
 .../connectors/jdbc/internal/xml/ElementType.java  |  2 -
 .../xml/JdbcConnectorServiceXmlParser.java         |  1 -
 .../geode.apache.org/schema/jdbc/jdbc-1.0.xsd      |  1 -
 .../sanctioned-geode-connectors-serializables.txt  |  2 +-
 .../jdbc/internal/RegionMappingTest.java           | 85 ++++++++++------------
 .../jdbc/internal/SqlToPdxInstanceCreatorTest.java | 25 +------
 .../internal/cli/CreateMappingFunctionTest.java    |  2 +-
 .../internal/cli/DescribeMappingCommandTest.java   |  4 +-
 .../jdbc/internal/cli/ListMappingCommandTest.java  |  4 +-
 .../jdbc/internal/xml/ElementTypeTest.java         |  3 -
 28 files changed, 112 insertions(+), 216 deletions(-)

diff --git a/geode-connectors/src/acceptanceTest/java/org/apache/geode/connectors/jdbc/ClassWithSupportedPdxFields.java b/geode-connectors/src/acceptanceTest/java/org/apache/geode/connectors/jdbc/ClassWithSupportedPdxFields.java
index 02aceff..cde4901 100644
--- a/geode-connectors/src/acceptanceTest/java/org/apache/geode/connectors/jdbc/ClassWithSupportedPdxFields.java
+++ b/geode-connectors/src/acceptanceTest/java/org/apache/geode/connectors/jdbc/ClassWithSupportedPdxFields.java
@@ -22,6 +22,7 @@ import java.util.Date;
 import org.apache.geode.internal.PdxSerializerObject;
 
 public class ClassWithSupportedPdxFields implements PdxSerializerObject, Serializable {
+  private String id;
   private boolean aboolean;
   private byte aByte;
   private short ASHORT;
@@ -37,9 +38,11 @@ public class ClassWithSupportedPdxFields implements PdxSerializerObject, Seriali
 
   public ClassWithSupportedPdxFields() {}
 
-  public ClassWithSupportedPdxFields(boolean aboolean, byte aByte, short ASHORT, int anint,
+  public ClassWithSupportedPdxFields(String id, boolean aboolean, byte aByte, short ASHORT,
+      int anint,
       long along, float afloat, double adouble, String astring, Date adate, Object anobject,
       byte[] abytearray, char achar) {
+    this.id = id;
     this.aboolean = aboolean;
     this.aByte = aByte;
     this.ASHORT = ASHORT;
@@ -54,6 +57,10 @@ public class ClassWithSupportedPdxFields implements PdxSerializerObject, Seriali
     this.achar = achar;
   }
 
+  public ClassWithSupportedPdxFields(String id) {
+    this.id = id;
+  }
+
   @Override
   public boolean equals(Object o) {
     if (this == o) {
@@ -65,6 +72,10 @@ public class ClassWithSupportedPdxFields implements PdxSerializerObject, Seriali
 
     ClassWithSupportedPdxFields that = (ClassWithSupportedPdxFields) o;
 
+    if (getId() != null ? !getId().equals(that.getId())
+        : that.getId() != null) {
+      return false;
+    }
     if (isAboolean() != that.isAboolean()) {
       return false;
     }
@@ -124,13 +135,18 @@ public class ClassWithSupportedPdxFields implements PdxSerializerObject, Seriali
 
   @Override
   public String toString() {
-    return "ClassWithSupportedPdxFields{" + "aboolean=" + isAboolean() + ", aByte=" + getAbyte()
+    return "ClassWithSupportedPdxFields{" + "id=" + getId() + ", aboolean=" + isAboolean()
+        + ", aByte=" + getAbyte()
         + ", achar=" + getAchar() + ", ASHORT=" + getAshort() + ", anint=" + getAnint() + ", along="
         + getAlong() + ", afloat=" + getAfloat() + ", adouble=" + getAdouble() + ", astring='"
         + getAstring() + '\'' + ", adate=" + getAdate() + ", anobject=" + getAnobject()
         + ", abytearray=" + Arrays.toString(getAbytearray()) + '}';
   }
 
+  public String getId() {
+    return id;
+  }
+
   public boolean isAboolean() {
     return aboolean;
   }
diff --git a/geode-connectors/src/acceptanceTest/java/org/apache/geode/connectors/jdbc/Employee.java b/geode-connectors/src/acceptanceTest/java/org/apache/geode/connectors/jdbc/Employee.java
index 82e2e90..83f5cd6 100644
--- a/geode-connectors/src/acceptanceTest/java/org/apache/geode/connectors/jdbc/Employee.java
+++ b/geode-connectors/src/acceptanceTest/java/org/apache/geode/connectors/jdbc/Employee.java
@@ -20,6 +20,7 @@ import org.apache.geode.pdx.PdxWriter;
 
 @SuppressWarnings("unused")
 public class Employee implements PdxSerializable {
+  private String id;
   private String name;
   private int age;
 
@@ -27,11 +28,16 @@ public class Employee implements PdxSerializable {
     // nothing
   }
 
-  Employee(String name, int age) {
+  Employee(String id, String name, int age) {
+    this.id = id;
     this.name = name;
     this.age = age;
   }
 
+  String getId() {
+    return id;
+  }
+
   String getName() {
     return name;
   }
@@ -42,12 +48,14 @@ public class Employee implements PdxSerializable {
 
   @Override
   public void toData(PdxWriter writer) {
+    writer.writeString("id", this.id);
     writer.writeString("name", this.name);
     writer.writeInt("age", this.age);
   }
 
   @Override
   public void fromData(PdxReader reader) {
+    this.id = reader.readString("id");
     this.name = reader.readString("name");
     this.age = reader.readInt("age");
   }
diff --git a/geode-connectors/src/acceptanceTest/java/org/apache/geode/connectors/jdbc/JdbcAsyncWriterIntegrationTest.java b/geode-connectors/src/acceptanceTest/java/org/apache/geode/connectors/jdbc/JdbcAsyncWriterIntegrationTest.java
index 6144275..42a9369 100644
--- a/geode-connectors/src/acceptanceTest/java/org/apache/geode/connectors/jdbc/JdbcAsyncWriterIntegrationTest.java
+++ b/geode-connectors/src/acceptanceTest/java/org/apache/geode/connectors/jdbc/JdbcAsyncWriterIntegrationTest.java
@@ -131,7 +131,7 @@ public abstract class JdbcAsyncWriterIntegrationTest {
   @Test
   public void putNonPdxInstanceThatIsPdxSerializable() throws SQLException {
     Region nonPdxEmployees = this.employees;
-    Employee value = new Employee("Emp2", 22);
+    Employee value = new Employee("2", "Emp2", 22);
     nonPdxEmployees.put("2", value);
 
     awaitUntil(() -> assertThat(jdbcWriter.getSuccessfulEvents()).isEqualTo(1));
diff --git a/geode-connectors/src/acceptanceTest/java/org/apache/geode/connectors/jdbc/JdbcDistributedTest.java b/geode-connectors/src/acceptanceTest/java/org/apache/geode/connectors/jdbc/JdbcDistributedTest.java
index f7d6454..e199bfa 100644
--- a/geode-connectors/src/acceptanceTest/java/org/apache/geode/connectors/jdbc/JdbcDistributedTest.java
+++ b/geode-connectors/src/acceptanceTest/java/org/apache/geode/connectors/jdbc/JdbcDistributedTest.java
@@ -474,10 +474,10 @@ public abstract class JdbcDistributedTest implements Serializable {
     createTable();
     createRegionUsingGfsh(true, false, true);
     createJdbcConnection();
-    createMapping(REGION_NAME, CONNECTION_NAME, Employee.class.getName(), false);
+    createMapping(REGION_NAME, CONNECTION_NAME, Employee.class.getName());
     server.invoke(() -> {
       String key = "id1";
-      Employee value = new Employee("Emp1", 55);
+      Employee value = new Employee(key, "Emp1", 55);
       Region<Object, Object> region = ClusterStartupRule.getCache().getRegion(REGION_NAME);
       region.put(key, value);
       region.invalidate(key);
@@ -496,11 +496,12 @@ public abstract class JdbcDistributedTest implements Serializable {
 
     createRegionUsingGfsh(true, false, true);
     createJdbcConnection();
-    createMapping(REGION_NAME, CONNECTION_NAME, ClassWithSupportedPdxFields.class.getName(), false);
+    createMapping(REGION_NAME, CONNECTION_NAME, ClassWithSupportedPdxFields.class.getName());
     client.invoke(() -> {
       String key = "id1";
-      ClassWithSupportedPdxFields value = new ClassWithSupportedPdxFields(true, (byte) 1, (short) 2,
-          3, 4, 5.5f, 6.0, "BigEmp", new Date(0), "BigEmpObject", new byte[] {1, 2}, 'c');
+      ClassWithSupportedPdxFields value =
+          new ClassWithSupportedPdxFields(key, true, (byte) 1, (short) 2,
+              3, 4, 5.5f, 6.0, "BigEmp", new Date(0), "BigEmpObject", new byte[] {1, 2}, 'c');
       Region<String, ClassWithSupportedPdxFields> region =
           ClusterStartupRule.getClientCache().getRegion(REGION_NAME);
       region.put(key, value);
@@ -519,10 +520,10 @@ public abstract class JdbcDistributedTest implements Serializable {
 
     createRegionUsingGfsh(true, false, true);
     createJdbcConnection();
-    createMapping(REGION_NAME, CONNECTION_NAME, ClassWithSupportedPdxFields.class.getName(), false);
+    createMapping(REGION_NAME, CONNECTION_NAME, ClassWithSupportedPdxFields.class.getName());
     client.invoke(() -> {
       String key = "id1";
-      ClassWithSupportedPdxFields value = new ClassWithSupportedPdxFields();
+      ClassWithSupportedPdxFields value = new ClassWithSupportedPdxFields(key);
       Region<String, ClassWithSupportedPdxFields> region =
           ClusterStartupRule.getClientCache().getRegion(REGION_NAME);
       region.put(key, value);
@@ -540,10 +541,11 @@ public abstract class JdbcDistributedTest implements Serializable {
     createClientRegion(client);
     createRegionUsingGfsh(true, false, true);
     createJdbcConnection();
-    createMapping(REGION_NAME, CONNECTION_NAME, ClassWithSupportedPdxFields.class.getName(), false);
+    createMapping(REGION_NAME, CONNECTION_NAME, ClassWithSupportedPdxFields.class.getName());
     String key = "id1";
-    ClassWithSupportedPdxFields value = new ClassWithSupportedPdxFields(true, (byte) 1, (short) 2,
-        3, 4, 5.5f, 6.0, "BigEmp", new Date(0), "BigEmpObject", new byte[] {1, 2}, 'c');
+    ClassWithSupportedPdxFields value =
+        new ClassWithSupportedPdxFields(key, true, (byte) 1, (short) 2,
+            3, 4, 5.5f, 6.0, "BigEmp", new Date(0), "BigEmpObject", new byte[] {1, 2}, 'c');
 
     server.invoke(() -> {
       insertDataForAllSupportedFieldsTable(key, value);
@@ -568,9 +570,9 @@ public abstract class JdbcDistributedTest implements Serializable {
     createClientRegion(client);
     createRegionUsingGfsh(true, false, true);
     createJdbcConnection();
-    createMapping(REGION_NAME, CONNECTION_NAME, ClassWithSupportedPdxFields.class.getName(), false);
+    createMapping(REGION_NAME, CONNECTION_NAME, ClassWithSupportedPdxFields.class.getName());
     String key = "id1";
-    ClassWithSupportedPdxFields value = new ClassWithSupportedPdxFields();
+    ClassWithSupportedPdxFields value = new ClassWithSupportedPdxFields(key);
 
     server.invoke(() -> {
       insertNullDataForAllSupportedFieldsTable(key);
@@ -640,14 +642,8 @@ public abstract class JdbcDistributedTest implements Serializable {
   }
 
   private void createMapping(String regionName, String connectionName, String pdxClassName) {
-    createMapping(regionName, connectionName, pdxClassName, true);
-  }
-
-  private void createMapping(String regionName, String connectionName, String pdxClassName,
-      boolean valueContainsPrimaryKey) {
     final String commandStr = "create jdbc-mapping --region=" + regionName + " --connection="
-        + connectionName + (valueContainsPrimaryKey ? " --value-contains-primary-key" : "")
-        + (pdxClassName != null ? " --pdx-name=" + pdxClassName : "");
+        + connectionName + (pdxClassName != null ? " --pdx-name=" + pdxClassName : "");
     gfsh.executeAndAssertThat(commandStr).statusIsSuccess();
   }
 
diff --git a/geode-connectors/src/acceptanceTest/java/org/apache/geode/connectors/jdbc/JdbcLoaderIntegrationTest.java b/geode-connectors/src/acceptanceTest/java/org/apache/geode/connectors/jdbc/JdbcLoaderIntegrationTest.java
index 3c5215e..aa21f2f 100644
--- a/geode-connectors/src/acceptanceTest/java/org/apache/geode/connectors/jdbc/JdbcLoaderIntegrationTest.java
+++ b/geode-connectors/src/acceptanceTest/java/org/apache/geode/connectors/jdbc/JdbcLoaderIntegrationTest.java
@@ -110,7 +110,8 @@ public abstract class JdbcLoaderIntegrationTest {
     Region<String, PdxInstance> region = createRegionWithJDBCLoader(REGION_TABLE_NAME, null, false);
     PdxInstance pdx = region.get("1");
 
-    assertThat(pdx.getFieldNames()).hasSize(2);
+    assertThat(pdx.getFieldNames()).hasSize(3);
+    assertThat(pdx.getField("id")).isEqualTo("1");
     assertThat(pdx.getField("name")).isEqualTo("Emp1");
     assertThat(pdx.getField("age")).isEqualTo(21);
   }
@@ -148,7 +149,7 @@ public abstract class JdbcLoaderIntegrationTest {
   public void verifyGetWithSupportedFieldsWithPdxClassName() throws Exception {
     createClassWithSupportedPdxFieldsTable(statement, REGION_TABLE_NAME);
     ClassWithSupportedPdxFields classWithSupportedPdxFields =
-        createClassWithSupportedPdxFieldsForInsert();
+        createClassWithSupportedPdxFieldsForInsert("1");
     insertIntoClassWithSupportedPdxFieldsTable("1", classWithSupportedPdxFields);
     Region<String, ClassWithSupportedPdxFields> region = createRegionWithJDBCLoader(
         REGION_TABLE_NAME, ClassWithSupportedPdxFields.class.getName(), false);
@@ -160,7 +161,7 @@ public abstract class JdbcLoaderIntegrationTest {
   }
 
   private void createPdxType() throws IOException {
-    createPdxType(new Employee("name", 45));
+    createPdxType(new Employee("id", "name", 45));
   }
 
   private void createPdxType(Object value) throws IOException {
@@ -194,9 +195,9 @@ public abstract class JdbcLoaderIntegrationTest {
     return regionFactory.create(regionName);
   }
 
-  private ClassWithSupportedPdxFields createClassWithSupportedPdxFieldsForInsert() {
+  private ClassWithSupportedPdxFields createClassWithSupportedPdxFieldsForInsert(String key) {
     ClassWithSupportedPdxFields classWithSupportedPdxFields =
-        new ClassWithSupportedPdxFields(true, (byte) 1, (short) 2, 3, 4, 5.5f, 6.0, "BigEmp",
+        new ClassWithSupportedPdxFields(key, true, (byte) 1, (short) 2, 3, 4, 5.5f, 6.0, "BigEmp",
             new Date(0), "BigEmpObject", new byte[] {1, 2}, 'c');
 
     return classWithSupportedPdxFields;
diff --git a/geode-connectors/src/acceptanceTest/java/org/apache/geode/connectors/jdbc/JdbcWriterIntegrationTest.java b/geode-connectors/src/acceptanceTest/java/org/apache/geode/connectors/jdbc/JdbcWriterIntegrationTest.java
index 8067fa7..79ff90d 100644
--- a/geode-connectors/src/acceptanceTest/java/org/apache/geode/connectors/jdbc/JdbcWriterIntegrationTest.java
+++ b/geode-connectors/src/acceptanceTest/java/org/apache/geode/connectors/jdbc/JdbcWriterIntegrationTest.java
@@ -148,7 +148,7 @@ public abstract class JdbcWriterIntegrationTest {
   @Test
   public void putNonPdxInstanceThatIsPdxSerializable() throws SQLException {
     Region nonPdxEmployees = this.employees;
-    Employee value = new Employee("Emp2", 22);
+    Employee value = new Employee("2", "Emp2", 22);
     nonPdxEmployees.put("2", value);
 
     ResultSet resultSet =
diff --git a/geode-connectors/src/acceptanceTest/java/org/apache/geode/connectors/jdbc/internal/TestConfigService.java b/geode-connectors/src/acceptanceTest/java/org/apache/geode/connectors/jdbc/internal/TestConfigService.java
index 6cc1d16..714b3dd 100644
--- a/geode-connectors/src/acceptanceTest/java/org/apache/geode/connectors/jdbc/internal/TestConfigService.java
+++ b/geode-connectors/src/acceptanceTest/java/org/apache/geode/connectors/jdbc/internal/TestConfigService.java
@@ -53,6 +53,6 @@ public class TestConfigService {
   private static RegionMapping createRegionMapping(String pdxClassName,
       boolean primaryKeyInValue) {
     return new RegionMapping(REGION_NAME, pdxClassName, REGION_TABLE_NAME,
-        CONNECTION_CONFIG_NAME, primaryKeyInValue);
+        CONNECTION_CONFIG_NAME);
   }
 }
diff --git a/geode-connectors/src/distributedTest/java/org/apache/geode/connectors/jdbc/internal/cli/CreateMappingCommandDUnitTest.java b/geode-connectors/src/distributedTest/java/org/apache/geode/connectors/jdbc/internal/cli/CreateMappingCommandDUnitTest.java
index 53b4627..975bb82 100644
--- a/geode-connectors/src/distributedTest/java/org/apache/geode/connectors/jdbc/internal/cli/CreateMappingCommandDUnitTest.java
+++ b/geode-connectors/src/distributedTest/java/org/apache/geode/connectors/jdbc/internal/cli/CreateMappingCommandDUnitTest.java
@@ -20,7 +20,6 @@ import static org.apache.geode.connectors.jdbc.internal.cli.CreateMappingCommand
 import static org.apache.geode.connectors.jdbc.internal.cli.CreateMappingCommand.CREATE_MAPPING__PDX_NAME;
 import static org.apache.geode.connectors.jdbc.internal.cli.CreateMappingCommand.CREATE_MAPPING__REGION_NAME;
 import static org.apache.geode.connectors.jdbc.internal.cli.CreateMappingCommand.CREATE_MAPPING__TABLE_NAME;
-import static org.apache.geode.connectors.jdbc.internal.cli.CreateMappingCommand.CREATE_MAPPING__VALUE_CONTAINS_PRIMARY_KEY;
 import static org.assertj.core.api.Assertions.assertThat;
 
 import java.util.List;
@@ -29,8 +28,6 @@ import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
-import org.w3c.dom.Element;
-import org.w3c.dom.NodeList;
 
 import org.apache.geode.connectors.jdbc.internal.JdbcConnectorService;
 import org.apache.geode.connectors.jdbc.internal.configuration.RegionMapping;
@@ -79,7 +76,6 @@ public class CreateMappingCommandDUnitTest {
     csb.addOption(CREATE_MAPPING__CONNECTION_NAME, "connection");
     csb.addOption(CREATE_MAPPING__TABLE_NAME, "myTable");
     csb.addOption(CREATE_MAPPING__PDX_NAME, "myPdxClass");
-    csb.addOption(CREATE_MAPPING__VALUE_CONTAINS_PRIMARY_KEY, "true");
     csb.addOption(CREATE_MAPPING__FIELD_MAPPING, "field1:column1,field2:column2");
 
     gfsh.executeAndAssertThat(csb.toString()).statusIsSuccess();
@@ -97,47 +93,6 @@ public class CreateMappingCommandDUnitTest {
       assertThat(mapping.getConnectionConfigName()).isEqualTo("connection");
       assertThat(mapping.getTableName()).isEqualTo("myTable");
       assertThat(mapping.getPdxName()).isEqualTo("myPdxClass");
-      assertThat(mapping.isPrimaryKeyInValue()).isEqualTo(true);
-      List<RegionMapping.FieldMapping> fieldMappings = mapping.getFieldMapping();
-      assertThat(fieldMappings).hasSize(2);
-      assertThat(fieldMappings.get(0).getFieldName()).isEqualTo("field1");
-      assertThat(fieldMappings.get(0).getColumnName()).isEqualTo("column1");
-      assertThat(fieldMappings.get(1).getFieldName()).isEqualTo("field2");
-      assertThat(fieldMappings.get(1).getColumnName()).isEqualTo("column2");
-    });
-  }
-
-  @Test
-  public void validateThatPrimaryKeyInValueDefaultsToFalse() {
-    CommandStringBuilder csb = new CommandStringBuilder(CREATE_MAPPING);
-    csb.addOption(CREATE_MAPPING__REGION_NAME, REGION_NAME);
-    csb.addOption(CREATE_MAPPING__CONNECTION_NAME, "connection");
-    csb.addOption(CREATE_MAPPING__TABLE_NAME, "myTable");
-    csb.addOption(CREATE_MAPPING__PDX_NAME, "myPdxClass");
-    csb.addOption(CREATE_MAPPING__FIELD_MAPPING, "field1:column1,field2:column2");
-
-    gfsh.executeAndAssertThat(csb.toString()).statusIsSuccess();
-
-    locator.invoke(() -> {
-      String xml = InternalLocator.getLocator().getConfigurationPersistenceService()
-          .getConfiguration("cluster").getCacheXmlContent();
-      assertThat(xml).isNotNull().contains("primary-key-in-value=\"false\"");
-      Element element = InternalLocator.getLocator().getConfigurationPersistenceService()
-          .getXmlElement(null, "region", "name", REGION_NAME);
-      assertThat(element).isNotNull();
-      NodeList list = element.getElementsByTagName("jdbc:mapping");
-      assertThat(list).isNotNull();
-      assertThat(list.getLength()).isEqualTo(1);
-    });
-
-    server.invoke(() -> {
-      InternalCache cache = ClusterStartupRule.getCache();
-      RegionMapping mapping =
-          cache.getService(JdbcConnectorService.class).getMappingForRegion(REGION_NAME);
-      assertThat(mapping.getConnectionConfigName()).isEqualTo("connection");
-      assertThat(mapping.getTableName()).isEqualTo("myTable");
-      assertThat(mapping.getPdxName()).isEqualTo("myPdxClass");
-      assertThat(mapping.isPrimaryKeyInValue()).isEqualTo(false);
       List<RegionMapping.FieldMapping> fieldMappings = mapping.getFieldMapping();
       assertThat(fieldMappings).hasSize(2);
       assertThat(fieldMappings.get(0).getFieldName()).isEqualTo("field1");
@@ -154,7 +109,6 @@ public class CreateMappingCommandDUnitTest {
     csb.addOption(CREATE_MAPPING__CONNECTION_NAME, "connection");
     csb.addOption(CREATE_MAPPING__TABLE_NAME, "myTable");
     csb.addOption(CREATE_MAPPING__PDX_NAME, "myPdxClass");
-    csb.addOption(CREATE_MAPPING__VALUE_CONTAINS_PRIMARY_KEY, "false");
 
     gfsh.executeAndAssertThat(csb.toString()).statusIsSuccess();
 
diff --git a/geode-connectors/src/distributedTest/java/org/apache/geode/connectors/jdbc/internal/cli/DescribeMappingCommandDUnitTest.java b/geode-connectors/src/distributedTest/java/org/apache/geode/connectors/jdbc/internal/cli/DescribeMappingCommandDUnitTest.java
index 53138b1..93f639f 100644
--- a/geode-connectors/src/distributedTest/java/org/apache/geode/connectors/jdbc/internal/cli/DescribeMappingCommandDUnitTest.java
+++ b/geode-connectors/src/distributedTest/java/org/apache/geode/connectors/jdbc/internal/cli/DescribeMappingCommandDUnitTest.java
@@ -20,7 +20,6 @@ import static org.apache.geode.connectors.jdbc.internal.cli.CreateMappingCommand
 import static org.apache.geode.connectors.jdbc.internal.cli.CreateMappingCommand.CREATE_MAPPING__PDX_NAME;
 import static org.apache.geode.connectors.jdbc.internal.cli.CreateMappingCommand.CREATE_MAPPING__REGION_NAME;
 import static org.apache.geode.connectors.jdbc.internal.cli.CreateMappingCommand.CREATE_MAPPING__TABLE_NAME;
-import static org.apache.geode.connectors.jdbc.internal.cli.CreateMappingCommand.CREATE_MAPPING__VALUE_CONTAINS_PRIMARY_KEY;
 import static org.apache.geode.connectors.jdbc.internal.cli.DescribeMappingCommand.DESCRIBE_MAPPING;
 import static org.apache.geode.connectors.jdbc.internal.cli.DescribeMappingCommand.DESCRIBE_MAPPING__REGION_NAME;
 import static org.assertj.core.api.Assertions.assertThat;
@@ -75,7 +74,6 @@ public class DescribeMappingCommandDUnitTest implements Serializable {
     csb.addOption(CREATE_MAPPING__CONNECTION_NAME, "connection");
     csb.addOption(CREATE_MAPPING__TABLE_NAME, "testTable");
     csb.addOption(CREATE_MAPPING__PDX_NAME, "myPdxClass");
-    csb.addOption(CREATE_MAPPING__VALUE_CONTAINS_PRIMARY_KEY, "true");
     csb.addOption(CREATE_MAPPING__FIELD_MAPPING, "field1:column1,field2:column2");
 
     gfsh.executeAndAssertThat(csb.toString()).statusIsSuccess();
@@ -90,7 +88,6 @@ public class DescribeMappingCommandDUnitTest implements Serializable {
     commandResultAssert.containsKeyValuePair(CREATE_MAPPING__CONNECTION_NAME, "connection");
     commandResultAssert.containsKeyValuePair(CREATE_MAPPING__TABLE_NAME, "testTable");
     commandResultAssert.containsKeyValuePair(CREATE_MAPPING__PDX_NAME, "myPdxClass");
-    commandResultAssert.containsKeyValuePair(CREATE_MAPPING__VALUE_CONTAINS_PRIMARY_KEY, "true");
     commandResultAssert.containsOutput("field1");
     commandResultAssert.containsOutput("field2");
     commandResultAssert.containsOutput("column1");
@@ -135,14 +132,13 @@ public class DescribeMappingCommandDUnitTest implements Serializable {
     commandResultAssert.containsKeyValuePair(CREATE_MAPPING__CONNECTION_NAME, "connection");
     commandResultAssert.containsKeyValuePair(CREATE_MAPPING__TABLE_NAME, "testTable");
     commandResultAssert.containsKeyValuePair(CREATE_MAPPING__PDX_NAME, "myPdxClass");
-    commandResultAssert.containsKeyValuePair(CREATE_MAPPING__VALUE_CONTAINS_PRIMARY_KEY, "true");
   }
 
   private void createRegionMapping() throws RegionMappingExistsException {
     InternalCache cache = ClusterStartupRule.getCache();
     JdbcConnectorService service = cache.getService(JdbcConnectorService.class);
     service.createRegionMapping(new RegionMapping(REGION_NAME, "myPdxClass",
-        "testTable", "connection", true));
+        "testTable", "connection"));
     assertThat(service.getMappingForRegion(REGION_NAME)).isNotNull();
   }
 }
diff --git a/geode-connectors/src/distributedTest/java/org/apache/geode/connectors/jdbc/internal/cli/DestroyMappingCommandDunitTest.java b/geode-connectors/src/distributedTest/java/org/apache/geode/connectors/jdbc/internal/cli/DestroyMappingCommandDunitTest.java
index 82b592c..ce43e30 100644
--- a/geode-connectors/src/distributedTest/java/org/apache/geode/connectors/jdbc/internal/cli/DestroyMappingCommandDunitTest.java
+++ b/geode-connectors/src/distributedTest/java/org/apache/geode/connectors/jdbc/internal/cli/DestroyMappingCommandDunitTest.java
@@ -20,7 +20,6 @@ import static org.apache.geode.connectors.jdbc.internal.cli.CreateMappingCommand
 import static org.apache.geode.connectors.jdbc.internal.cli.CreateMappingCommand.CREATE_MAPPING__PDX_NAME;
 import static org.apache.geode.connectors.jdbc.internal.cli.CreateMappingCommand.CREATE_MAPPING__REGION_NAME;
 import static org.apache.geode.connectors.jdbc.internal.cli.CreateMappingCommand.CREATE_MAPPING__TABLE_NAME;
-import static org.apache.geode.connectors.jdbc.internal.cli.CreateMappingCommand.CREATE_MAPPING__VALUE_CONTAINS_PRIMARY_KEY;
 import static org.apache.geode.connectors.jdbc.internal.cli.DestroyMappingCommand.DESTROY_MAPPING;
 import static org.apache.geode.connectors.jdbc.internal.cli.DestroyMappingCommand.DESTROY_MAPPING__REGION_NAME;
 import static org.assertj.core.api.Assertions.assertThat;
@@ -76,7 +75,6 @@ public class DestroyMappingCommandDunitTest implements Serializable {
     csb.addOption(CREATE_MAPPING__CONNECTION_NAME, "connection");
     csb.addOption(CREATE_MAPPING__TABLE_NAME, "myTable");
     csb.addOption(CREATE_MAPPING__PDX_NAME, "myPdxClass");
-    csb.addOption(CREATE_MAPPING__VALUE_CONTAINS_PRIMARY_KEY, "true");
     csb.addOption(CREATE_MAPPING__FIELD_MAPPING, "field1:column1,field2:column2");
 
     gfsh.executeAndAssertThat(csb.toString()).statusIsSuccess();
diff --git a/geode-connectors/src/distributedTest/java/org/apache/geode/connectors/jdbc/internal/cli/JdbcClusterConfigDistributedTest.java b/geode-connectors/src/distributedTest/java/org/apache/geode/connectors/jdbc/internal/cli/JdbcClusterConfigDistributedTest.java
index 7600804..77a3af9 100644
--- a/geode-connectors/src/distributedTest/java/org/apache/geode/connectors/jdbc/internal/cli/JdbcClusterConfigDistributedTest.java
+++ b/geode-connectors/src/distributedTest/java/org/apache/geode/connectors/jdbc/internal/cli/JdbcClusterConfigDistributedTest.java
@@ -55,7 +55,7 @@ public class JdbcClusterConfigDistributedTest {
     gfsh.executeAndAssertThat("create region --name=regionName --type=PARTITION").statusIsSuccess();
 
     gfsh.executeAndAssertThat(
-        "create jdbc-mapping --region=regionName --connection=connection --table=testTable --pdx-name=myPdxClass --value-contains-primary-key --field-mapping=field1:column1,field2:column2")
+        "create jdbc-mapping --region=regionName --connection=connection --table=testTable --pdx-name=myPdxClass --field-mapping=field1:column1,field2:column2")
         .statusIsSuccess();
 
     server.invoke(() -> {
@@ -80,7 +80,6 @@ public class JdbcClusterConfigDistributedTest {
     assertThat(regionMapping.getConnectionConfigName()).isEqualTo("connection");
     assertThat(regionMapping.getTableName()).isEqualTo("testTable");
     assertThat(regionMapping.getPdxName()).isEqualTo("myPdxClass");
-    assertThat(regionMapping.isPrimaryKeyInValue()).isEqualTo(true);
     assertThat(regionMapping.getColumnNameForField("field1", mock(TableMetaDataView.class)))
         .isEqualTo("column1");
     assertThat(regionMapping.getColumnNameForField("field2", mock(TableMetaDataView.class)))
diff --git a/geode-connectors/src/distributedTest/java/org/apache/geode/connectors/jdbc/internal/cli/ListMappingCommandDUnitTest.java b/geode-connectors/src/distributedTest/java/org/apache/geode/connectors/jdbc/internal/cli/ListMappingCommandDUnitTest.java
index 93e9b70..61293fe 100644
--- a/geode-connectors/src/distributedTest/java/org/apache/geode/connectors/jdbc/internal/cli/ListMappingCommandDUnitTest.java
+++ b/geode-connectors/src/distributedTest/java/org/apache/geode/connectors/jdbc/internal/cli/ListMappingCommandDUnitTest.java
@@ -62,7 +62,7 @@ public class ListMappingCommandDUnitTest implements Serializable {
         .statusIsSuccess();
 
     String mapping = "create jdbc-mapping --region=testRegion --connection=connection "
-        + "--table=myTable --pdx-name=myPdxClass --value-contains-primary-key=true "
+        + "--table=myTable --pdx-name=myPdxClass "
         + "--field-mapping=field1:column1,field2:column2";
     gfsh.executeAndAssertThat(mapping).statusIsSuccess();
 
@@ -117,7 +117,7 @@ public class ListMappingCommandDUnitTest implements Serializable {
     for (int i = 1; i <= N; i++) {
       String name = regionName + "-" + i;
       service.createRegionMapping(
-          new RegionMapping(name, "x.y.MyPdxClass", "table", "connection", true));
+          new RegionMapping(name, "x.y.MyPdxClass", "table", "connection"));
       assertThat(service.getMappingForRegion(name)).isNotNull();
     }
   }
diff --git a/geode-connectors/src/integrationTest/java/org/apache/geode/connectors/jdbc/internal/cli/CreateMappingCommandIntegrationTest.java b/geode-connectors/src/integrationTest/java/org/apache/geode/connectors/jdbc/internal/cli/CreateMappingCommandIntegrationTest.java
index 54aa4fb..ed8fd2d 100644
--- a/geode-connectors/src/integrationTest/java/org/apache/geode/connectors/jdbc/internal/cli/CreateMappingCommandIntegrationTest.java
+++ b/geode-connectors/src/integrationTest/java/org/apache/geode/connectors/jdbc/internal/cli/CreateMappingCommandIntegrationTest.java
@@ -45,7 +45,6 @@ public class CreateMappingCommandIntegrationTest {
   private String connectionName;
   private String tableName;
   private String pdxClass;
-  private boolean keyInValue;
   private String[] fieldMappings;
 
   @Before
@@ -54,7 +53,6 @@ public class CreateMappingCommandIntegrationTest {
     connectionName = "connection";
     tableName = "testTable";
     pdxClass = "myPdxClass";
-    keyInValue = true;
     fieldMappings = new String[] {"field1:column1", "field2:column2"};
 
     cache = (InternalCache) new CacheFactory().set("locators", "").set("mcast-port", "0")
@@ -73,7 +71,7 @@ public class CreateMappingCommandIntegrationTest {
   @Test
   public void createsRegionMappingInService() {
     ResultModel result = createRegionMappingCommand.createMapping(regionName, connectionName,
-        tableName, pdxClass, keyInValue, fieldMappings);
+        tableName, pdxClass, fieldMappings);
 
     assertThat(result.getStatus()).isSameAs(Result.Status.OK);
 
@@ -85,7 +83,6 @@ public class CreateMappingCommandIntegrationTest {
     assertThat(regionMapping.getConnectionConfigName()).isEqualTo(connectionName);
     assertThat(regionMapping.getTableName()).isEqualTo(tableName);
     assertThat(regionMapping.getPdxName()).isEqualTo(pdxClass);
-    assertThat(regionMapping.isPrimaryKeyInValue()).isEqualTo(keyInValue);
     assertThat(regionMapping.getColumnNameForField("field1", mock(TableMetaDataView.class)))
         .isEqualTo("column1");
     assertThat(regionMapping.getColumnNameForField("field2", mock(TableMetaDataView.class)))
@@ -98,7 +95,7 @@ public class CreateMappingCommandIntegrationTest {
     ResultModel result;
     result =
         createRegionMappingCommand.createMapping(regionName, connectionName, tableName, pdxClass,
-            keyInValue, fieldMappings);
+            fieldMappings);
     assertThat(result.getStatus()).isSameAs(Result.Status.OK);
 
     IgnoredException ignoredException =
@@ -106,7 +103,7 @@ public class CreateMappingCommandIntegrationTest {
 
     try {
       result = createRegionMappingCommand.createMapping(regionName, connectionName, tableName,
-          pdxClass, keyInValue, fieldMappings);
+          pdxClass, fieldMappings);
     } finally {
       ignoredException.remove();
     }
@@ -117,7 +114,7 @@ public class CreateMappingCommandIntegrationTest {
   @Test
   public void createsRegionMappingWithMinimumParams() {
     ResultModel result = createRegionMappingCommand.createMapping(regionName, connectionName, null,
-        null, false, null);
+        null, null);
 
     assertThat(result.getStatus()).isSameAs(Result.Status.OK);
 
@@ -129,7 +126,6 @@ public class CreateMappingCommandIntegrationTest {
     assertThat(regionMapping.getConnectionConfigName()).isEqualTo(connectionName);
     assertThat(regionMapping.getTableName()).isNull();
     assertThat(regionMapping.getPdxName()).isNull();
-    assertThat(regionMapping.isPrimaryKeyInValue()).isFalse();
     assertThat(regionMapping.getFieldMapping()).isEmpty();
   }
 }
diff --git a/geode-connectors/src/integrationTest/java/org/apache/geode/connectors/jdbc/internal/cli/DestroyMappingCommandIntegrationTest.java b/geode-connectors/src/integrationTest/java/org/apache/geode/connectors/jdbc/internal/cli/DestroyMappingCommandIntegrationTest.java
index df08f1f..6f9896a 100644
--- a/geode-connectors/src/integrationTest/java/org/apache/geode/connectors/jdbc/internal/cli/DestroyMappingCommandIntegrationTest.java
+++ b/geode-connectors/src/integrationTest/java/org/apache/geode/connectors/jdbc/internal/cli/DestroyMappingCommandIntegrationTest.java
@@ -44,7 +44,7 @@ public class DestroyMappingCommandIntegrationTest {
     regionName = "testRegion";
 
     String[] params = new String[] {"param1:value1", "param2:value2"};
-    mapping = new RegionMapping(regionName, null, null, null, null);
+    mapping = new RegionMapping(regionName, null, null, null);
 
     cache = (InternalCache) new CacheFactory().set("locators", "").set("mcast-port", "0")
         .set(ENABLE_CLUSTER_CONFIGURATION, "true").create();
diff --git a/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/SqlToPdxInstanceCreator.java b/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/SqlToPdxInstanceCreator.java
index 2f4803c..9e7f791 100644
--- a/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/SqlToPdxInstanceCreator.java
+++ b/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/SqlToPdxInstanceCreator.java
@@ -55,12 +55,9 @@ class SqlToPdxInstanceCreator {
     final int columnCount = metaData.getColumnCount();
     for (int i = 1; i <= columnCount; i++) {
       String columnName = metaData.getColumnName(i);
-      if (regionMapping.isPrimaryKeyInValue()
-          || !tableMetaData.getKeyColumnName().equals(columnName)) {
-        String fieldName = regionMapping.getFieldNameForColumn(columnName, typeRegistry);
-        FieldType fieldType = getFieldType(typeRegistry, fieldName);
-        writeField(columnName, i, fieldName, fieldType);
-      }
+      String fieldName = regionMapping.getFieldNameForColumn(columnName, typeRegistry);
+      FieldType fieldType = getFieldType(typeRegistry, fieldName);
+      writeField(columnName, i, fieldName, fieldType);
     }
     if (resultSet.next()) {
       throw new JdbcConnectorException(
diff --git a/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/cli/CreateMappingCommand.java b/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/cli/CreateMappingCommand.java
index 0b64f10..dbdb173 100644
--- a/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/cli/CreateMappingCommand.java
+++ b/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/cli/CreateMappingCommand.java
@@ -48,9 +48,6 @@ public class CreateMappingCommand extends SingleGfshCommand {
       "Name of database table for values to be written to.";
   static final String CREATE_MAPPING__CONNECTION_NAME = "connection";
   static final String CREATE_MAPPING__CONNECTION_NAME__HELP = "Name of JDBC connection to use.";
-  static final String CREATE_MAPPING__VALUE_CONTAINS_PRIMARY_KEY = "value-contains-primary-key";
-  static final String CREATE_MAPPING__PRIMARY_KEY_IN_VALUE__HELP =
-      "If true, the primary key is contained in the PDX object, otherwise the region entry key is used for the primary key column value.";
   static final String CREATE_MAPPING__FIELD_MAPPING = "field-mapping";
   static final String CREATE_MAPPING__FIELD_MAPPING__HELP =
       "Key value pairs of PDX field names to database column names formatted like \"key:value(,key:value)*\".";
@@ -68,15 +65,12 @@ public class CreateMappingCommand extends SingleGfshCommand {
           help = CREATE_MAPPING__TABLE_NAME__HELP) String table,
       @CliOption(key = CREATE_MAPPING__PDX_NAME,
           help = CREATE_MAPPING__PDX_NAME__HELP) String pdxName,
-      @CliOption(key = CREATE_MAPPING__VALUE_CONTAINS_PRIMARY_KEY,
-          help = CREATE_MAPPING__PRIMARY_KEY_IN_VALUE__HELP, unspecifiedDefaultValue = "false",
-          specifiedDefaultValue = "true") boolean keyInValue,
       @CliOption(key = CREATE_MAPPING__FIELD_MAPPING,
           help = CREATE_MAPPING__FIELD_MAPPING__HELP) String[] fieldMappings) {
     // input
     Set<DistributedMember> targetMembers = getMembers(null, null);
     RegionMapping mapping = new RegionMapping(regionName,
-        pdxName, table, connectionName, keyInValue);
+        pdxName, table, connectionName);
     mapping.setFieldMapping(fieldMappings);
 
     // action
diff --git a/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/cli/DescribeMappingCommand.java b/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/cli/DescribeMappingCommand.java
index 53c7b41..507d881 100644
--- a/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/cli/DescribeMappingCommand.java
+++ b/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/cli/DescribeMappingCommand.java
@@ -18,7 +18,6 @@ import static org.apache.geode.connectors.jdbc.internal.cli.CreateMappingCommand
 import static org.apache.geode.connectors.jdbc.internal.cli.CreateMappingCommand.CREATE_MAPPING__PDX_NAME;
 import static org.apache.geode.connectors.jdbc.internal.cli.CreateMappingCommand.CREATE_MAPPING__REGION_NAME;
 import static org.apache.geode.connectors.jdbc.internal.cli.CreateMappingCommand.CREATE_MAPPING__TABLE_NAME;
-import static org.apache.geode.connectors.jdbc.internal.cli.CreateMappingCommand.CREATE_MAPPING__VALUE_CONTAINS_PRIMARY_KEY;
 
 import java.util.Set;
 
@@ -87,7 +86,6 @@ public class DescribeMappingCommand extends GfshCommand {
     sectionModel.addData(CREATE_MAPPING__CONNECTION_NAME, mapping.getConnectionConfigName());
     sectionModel.addData(CREATE_MAPPING__TABLE_NAME, mapping.getTableName());
     sectionModel.addData(CREATE_MAPPING__PDX_NAME, mapping.getPdxName());
-    sectionModel.addData(CREATE_MAPPING__VALUE_CONTAINS_PRIMARY_KEY, mapping.isPrimaryKeyInValue());
 
     TabularResultModel tabularResultData = resultModel.addTable(FIELD_TO_COLUMN_TABLE);
     tabularResultData.setHeader("Field to Column Mappings:");
diff --git a/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/configuration/RegionMapping.java b/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/configuration/RegionMapping.java
index b7f02de..1d0e678 100644
--- a/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/configuration/RegionMapping.java
+++ b/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/configuration/RegionMapping.java
@@ -65,7 +65,6 @@ import org.apache.geode.pdx.internal.TypeRegistry;
  *       &lt;attribute name="connection-name" type="{http://www.w3.org/2001/XMLSchema}string" />
  *       &lt;attribute name="table" type="{http://www.w3.org/2001/XMLSchema}string" />
  *       &lt;attribute name="pdx-name" type="{http://www.w3.org/2001/XMLSchema}string" />
- *       &lt;attribute name="primary-key-in-value" type="{http://www.w3.org/2001/XMLSchema}string" />
  *     &lt;/restriction>
  *   &lt;/complexContent>
  * &lt;/complexType>
@@ -92,8 +91,6 @@ public class RegionMapping implements CacheElement {
   protected String tableName;
   @XmlAttribute(name = "pdx-name")
   protected String pdxName;
-  @XmlAttribute(name = "primary-key-in-value")
-  protected Boolean primaryKeyInValue;
 
   @XmlTransient
   protected String regionName;
@@ -103,12 +100,11 @@ public class RegionMapping implements CacheElement {
   public RegionMapping() {}
 
   public RegionMapping(String regionName, String pdxName, String tableName,
-      String connectionConfigName, Boolean primaryKeyInValue) {
+      String connectionConfigName) {
     this.regionName = regionName;
     this.pdxName = pdxName;
     this.tableName = tableName;
     this.connectionConfigName = connectionConfigName;
-    this.primaryKeyInValue = primaryKeyInValue;
   }
 
   public void setFieldMapping(String[] mappings) {
@@ -149,10 +145,6 @@ public class RegionMapping implements CacheElement {
     this.pdxName = pdxName;
   }
 
-  public void setPrimaryKeyInValue(Boolean primaryKeyInValue) {
-    this.primaryKeyInValue = primaryKeyInValue;
-  }
-
   public boolean isFieldMappingModified() {
     return fieldMappingModified;
   }
@@ -180,14 +172,6 @@ public class RegionMapping implements CacheElement {
     return tableName;
   }
 
-  public Boolean getPrimaryKeyInValue() {
-    return primaryKeyInValue;
-  }
-
-  public Boolean isPrimaryKeyInValue() {
-    return primaryKeyInValue;
-  }
-
   public String getRegionToTableName() {
     if (tableName == null) {
       return regionName;
@@ -313,9 +297,6 @@ public class RegionMapping implements CacheElement {
 
     RegionMapping that = (RegionMapping) o;
 
-    if (primaryKeyInValue != that.primaryKeyInValue) {
-      return false;
-    }
     if (regionName != null ? !regionName.equals(that.regionName) : that.regionName != null) {
       return false;
     }
@@ -343,7 +324,6 @@ public class RegionMapping implements CacheElement {
     result = 31 * result + (pdxName != null ? pdxName.hashCode() : 0);
     result = 31 * result + (tableName != null ? tableName.hashCode() : 0);
     result = 31 * result + (connectionConfigName != null ? connectionConfigName.hashCode() : 0);
-    result = 31 * result + (primaryKeyInValue ? 1 : 0);
     return result;
   }
 
@@ -351,7 +331,7 @@ public class RegionMapping implements CacheElement {
   public String toString() {
     return "RegionMapping{" + "regionName='" + regionName + '\'' + ", pdxName='"
         + pdxName + '\'' + ", tableName='" + tableName + '\'' + ", connectionConfigName='"
-        + connectionConfigName + '\'' + ", primaryKeyInValue=" + primaryKeyInValue + '}';
+        + connectionConfigName + '\'' + '}';
   }
 
   @Override
diff --git a/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/xml/ElementType.java b/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/xml/ElementType.java
index 32f09a4..b605ca0 100644
--- a/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/xml/ElementType.java
+++ b/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/xml/ElementType.java
@@ -37,8 +37,6 @@ public enum ElementType {
           attributes.getValue(JdbcConnectorServiceXmlParser.CONNECTION_NAME));
       mapping.setTableName(attributes.getValue(JdbcConnectorServiceXmlParser.TABLE));
       mapping.setPdxName(attributes.getValue(JdbcConnectorServiceXmlParser.PDX_NAME));
-      mapping.setPrimaryKeyInValue(
-          Boolean.valueOf(attributes.getValue(JdbcConnectorServiceXmlParser.PRIMARY_KEY_IN_VALUE)));
       stack.push(mapping);
     }
 
diff --git a/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/xml/JdbcConnectorServiceXmlParser.java b/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/xml/JdbcConnectorServiceXmlParser.java
index 6b41328..742e0dc 100644
--- a/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/xml/JdbcConnectorServiceXmlParser.java
+++ b/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/xml/JdbcConnectorServiceXmlParser.java
@@ -32,7 +32,6 @@ public class JdbcConnectorServiceXmlParser extends AbstractXmlParser {
   static final String PDX_NAME = "pdx-name";
   static final String FIELD_NAME = "field-name";
   static final String COLUMN_NAME = "column-name";
-  static final String PRIMARY_KEY_IN_VALUE = "primary-key-in-value";
 
   @Override
   public String getNamespaceUri() {
diff --git a/geode-connectors/src/main/resources/META-INF/schemas/geode.apache.org/schema/jdbc/jdbc-1.0.xsd b/geode-connectors/src/main/resources/META-INF/schemas/geode.apache.org/schema/jdbc/jdbc-1.0.xsd
index f83af7e..243945e 100644
--- a/geode-connectors/src/main/resources/META-INF/schemas/geode.apache.org/schema/jdbc/jdbc-1.0.xsd
+++ b/geode-connectors/src/main/resources/META-INF/schemas/geode.apache.org/schema/jdbc/jdbc-1.0.xsd
@@ -55,7 +55,6 @@ XML schema for JDBC Connector Service in Geode.
                 <xsd:attribute type="xsd:string" name="connection-name" use="optional"/>
                 <xsd:attribute type="xsd:string" name="table" use="optional"/>
                 <xsd:attribute type="xsd:string" name="pdx-name" use="optional"/>
-                <xsd:attribute type="xsd:string" name="primary-key-in-value" use="optional"/>
             </xsd:complexType>
         </xsd:element>
 </xsd:schema>
diff --git a/geode-connectors/src/main/resources/org/apache/geode/internal/sanctioned-geode-connectors-serializables.txt b/geode-connectors/src/main/resources/org/apache/geode/internal/sanctioned-geode-connectors-serializables.txt
index e40d752..4a82802 100755
--- a/geode-connectors/src/main/resources/org/apache/geode/internal/sanctioned-geode-connectors-serializables.txt
+++ b/geode-connectors/src/main/resources/org/apache/geode/internal/sanctioned-geode-connectors-serializables.txt
@@ -5,5 +5,5 @@ org/apache/geode/connectors/jdbc/internal/cli/CreateMappingFunction,false
 org/apache/geode/connectors/jdbc/internal/cli/DescribeMappingFunction,false
 org/apache/geode/connectors/jdbc/internal/cli/DestroyMappingFunction,false
 org/apache/geode/connectors/jdbc/internal/cli/ListMappingFunction,false
-org/apache/geode/connectors/jdbc/internal/configuration/RegionMapping,false,connectionConfigName:java/lang/String,fieldMapping:java/util/List,fieldMappingModified:boolean,pdxName:java/lang/String,primaryKeyInValue:java/lang/Boolean,regionName:java/lang/String,tableName:java/lang/String
+org/apache/geode/connectors/jdbc/internal/configuration/RegionMapping,false,connectionConfigName:java/lang/String,fieldMapping:java/util/List,fieldMappingModified:boolean,pdxName:java/lang/String,regionName:java/lang/String,tableName:java/lang/String
 org/apache/geode/connectors/jdbc/internal/configuration/RegionMapping$FieldMapping,false,columnName:java/lang/String,fieldName:java/lang/String
diff --git a/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/RegionMappingTest.java b/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/RegionMappingTest.java
index 8e2cac1..dd84186 100644
--- a/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/RegionMappingTest.java
+++ b/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/RegionMappingTest.java
@@ -57,7 +57,7 @@ public class RegionMappingTest {
 
   @Test
   public void emptyArrayFiledMapping() {
-    mapping = new RegionMapping("region", "class", "table", "connection", false);
+    mapping = new RegionMapping("region", "class", "table", "connection");
     mapping.setFieldMapping(new String[0]);
     assertThat(mapping.isFieldMappingModified()).isTrue();
     assertThat(mapping.getFieldMapping()).isEmpty();
@@ -65,7 +65,7 @@ public class RegionMappingTest {
 
   @Test
   public void initiatedWithNullValues() {
-    mapping = new RegionMapping(null, null, null, null, false);
+    mapping = new RegionMapping(null, null, null, null);
 
     assertThat(mapping.getTableName()).isNull();
     assertThat(mapping.getRegionName()).isNull();
@@ -80,7 +80,7 @@ public class RegionMappingTest {
 
   @Test
   public void hasCorrectTableName() {
-    mapping = new RegionMapping(null, null, name, null, false);
+    mapping = new RegionMapping(null, null, name, null);
 
     assertThat(mapping.getTableName()).isEqualTo(name);
     assertThat(mapping.getRegionToTableName()).isEqualTo(name);
@@ -88,7 +88,7 @@ public class RegionMappingTest {
 
   @Test
   public void hasCorrectTableNameWhenRegionNameIsSet() {
-    mapping = new RegionMapping("regionName", null, "tableName", null, false);
+    mapping = new RegionMapping("regionName", null, "tableName", null);
 
     assertThat(mapping.getRegionName()).isEqualTo("regionName");
     assertThat(mapping.getTableName()).isEqualTo("tableName");
@@ -97,7 +97,7 @@ public class RegionMappingTest {
 
   @Test
   public void hasCorrectRegionName() {
-    mapping = new RegionMapping(name, null, null, null, false);
+    mapping = new RegionMapping(name, null, null, null);
 
     assertThat(mapping.getRegionName()).isEqualTo(name);
     assertThat(mapping.getRegionToTableName()).isEqualTo(name);
@@ -105,28 +105,21 @@ public class RegionMappingTest {
 
   @Test
   public void hasCorrectConfigName() {
-    mapping = new RegionMapping(null, null, null, name, false);
+    mapping = new RegionMapping(null, null, null, name);
 
     assertThat(mapping.getConnectionConfigName()).isEqualTo(name);
   }
 
   @Test
   public void hasCorrectPdxClassName() {
-    mapping = new RegionMapping(null, name, null, null, false);
+    mapping = new RegionMapping(null, name, null, null);
 
     assertThat(mapping.getPdxName()).isEqualTo(name);
   }
 
   @Test
-  public void primaryKeyInValueSetCorrectly() {
-    mapping = new RegionMapping(null, null, null, null, true);
-
-    assertThat(mapping.isPrimaryKeyInValue()).isTrue();
-  }
-
-  @Test
   public void returnsColumnNameIfFieldNotMapped() {
-    mapping = new RegionMapping(null, null, null, null, true);
+    mapping = new RegionMapping(null, null, null, null);
     mapping.setFieldMapping(new String[] {"otherField:column"});
 
     String columnName = mapping.getColumnNameForField(fieldName1, mock(TableMetaDataView.class));
@@ -137,7 +130,7 @@ public class RegionMappingTest {
   @Test
   public void returnsColumnNameFromTableMetaDataIfFieldNotMappedAndMetaDataMatchesWithCaseDiffering() {
     String metaDataColumnName = fieldName1.toUpperCase();
-    mapping = new RegionMapping(null, null, null, null, true);
+    mapping = new RegionMapping(null, null, null, null);
     mapping.setFieldMapping(new String[] {"otherField:column"});
     TableMetaDataView tableMetaDataView = mock(TableMetaDataView.class);
     when(tableMetaDataView.getColumnNames()).thenReturn(Collections.singleton(metaDataColumnName));
@@ -149,7 +142,7 @@ public class RegionMappingTest {
   @Test
   public void returnsColumnNameFromTableMetaDataIfFieldNotMappedAndMetaDataMatchesExactly() {
     String metaDataColumnName = fieldName1;
-    mapping = new RegionMapping(null, null, null, null, true);
+    mapping = new RegionMapping(null, null, null, null);
     mapping.setFieldMapping(new String[] {"otherField:column"});
     TableMetaDataView tableMetaDataView = mock(TableMetaDataView.class);
     when(tableMetaDataView.getColumnNames()).thenReturn(Collections.singleton(metaDataColumnName));
@@ -160,7 +153,7 @@ public class RegionMappingTest {
 
   @Test
   public void returnsColumnNameIfFieldNotMappedAndNotInMetaData() {
-    mapping = new RegionMapping(null, null, null, null, true);
+    mapping = new RegionMapping(null, null, null, null);
     mapping.setFieldMapping(new String[] {"otherField:column"});
     TableMetaDataView tableMetaDataView = mock(TableMetaDataView.class);
     when(tableMetaDataView.getColumnNames()).thenReturn(Collections.singleton("does not match"));
@@ -170,7 +163,7 @@ public class RegionMappingTest {
 
   @Test
   public void getColumnNameForFieldThrowsIfTwoColumnsMatchField() {
-    mapping = new RegionMapping(null, null, null, null, true);
+    mapping = new RegionMapping(null, null, null, null);
     mapping.setFieldMapping(new String[] {"otherField:column"});
 
     TableMetaDataView tableMetaDataView = mock(TableMetaDataView.class);
@@ -187,7 +180,7 @@ public class RegionMappingTest {
 
   @Test
   public void ifMixedCaseColumnNameNotMappedReturnsItAsFieldName() {
-    mapping = new RegionMapping(null, null, null, null, true);
+    mapping = new RegionMapping(null, null, null, null);
     mapping.setFieldMapping(new String[] {"otherField:column"});
 
     assertThat(mapping.getFieldNameForColumn("columnName", null)).isEqualTo("columnName");
@@ -195,7 +188,7 @@ public class RegionMappingTest {
 
   @Test
   public void ifLowerCaseColumnNameNotMappedReturnsItAsFieldName() {
-    mapping = new RegionMapping(null, null, null, null, true);
+    mapping = new RegionMapping(null, null, null, null);
     mapping.setFieldMapping(new String[] {"otherField:column"});
 
     assertThat(mapping.getFieldNameForColumn("columnname", null)).isEqualTo("columnname");
@@ -203,7 +196,7 @@ public class RegionMappingTest {
 
   @Test
   public void ifUpperCaseColumnNameNotMappedReturnsItLowerCasedAsFieldName() {
-    mapping = new RegionMapping(null, null, null, null, true);
+    mapping = new RegionMapping(null, null, null, null);
     mapping.setFieldMapping(new String[] {"otherField:column"});
 
     assertThat(mapping.getFieldNameForColumn("COLUMNNAME", null)).isEqualTo("columnname");
@@ -212,7 +205,7 @@ public class RegionMappingTest {
 
   @Test
   public void throwsIfColumnNotMappedAndPdxClassNameDoesNotExist() {
-    mapping = new RegionMapping(null, "pdxClassName", null, null, true);
+    mapping = new RegionMapping(null, "pdxClassName", null, null);
     TypeRegistry typeRegistry = mock(TypeRegistry.class);
     when(typeRegistry.getPdxTypesForClassName("pdxClassName")).thenReturn(Collections.emptySet());
     expectedException.expect(JdbcConnectorException.class);
@@ -225,7 +218,7 @@ public class RegionMappingTest {
   public void throwsIfColumnNotMappedAndPdxClassNameDoesExistButHasNoMatchingFields() {
     String pdxClassName = "pdxClassName";
     String columnName = "columnName";
-    mapping = new RegionMapping(null, pdxClassName, null, null, true);
+    mapping = new RegionMapping(null, pdxClassName, null, null);
     TypeRegistry typeRegistry = mock(TypeRegistry.class);
     HashSet<PdxType> pdxTypes = new HashSet<>(Arrays.asList(mock(PdxType.class)));
     when(typeRegistry.getPdxTypesForClassName(pdxClassName)).thenReturn(pdxTypes);
@@ -240,7 +233,7 @@ public class RegionMappingTest {
   public void throwsIfColumnNotMappedAndPdxClassNameDoesExistButHasMoreThanOneMatchingFields() {
     String pdxClassName = "pdxClassName";
     String columnName = "columnName";
-    mapping = new RegionMapping(null, pdxClassName, null, null, true);
+    mapping = new RegionMapping(null, pdxClassName, null, null);
     TypeRegistry typeRegistry = mock(TypeRegistry.class);
     PdxType pdxType = mock(PdxType.class);
     when(pdxType.getFieldNames())
@@ -258,7 +251,7 @@ public class RegionMappingTest {
   public void returnsIfColumnNotMappedAndPdxClassNameDoesExistAndHasOneFieldThatInexactlyMatches() {
     String pdxClassName = "pdxClassName";
     String columnName = "columnName";
-    mapping = new RegionMapping(null, pdxClassName, null, null, true);
+    mapping = new RegionMapping(null, pdxClassName, null, null);
     TypeRegistry typeRegistry = mock(TypeRegistry.class);
     PdxType pdxType = mock(PdxType.class);
     when(pdxType.getFieldNames())
@@ -274,7 +267,7 @@ public class RegionMappingTest {
   public void returnsIfColumnNotMappedAndPdxClassNameDoesExistAndHasOneFieldThatExactlyMatches() {
     String pdxClassName = "pdxClassName";
     String columnName = "columnName";
-    mapping = new RegionMapping(null, pdxClassName, null, null, true);
+    mapping = new RegionMapping(null, pdxClassName, null, null);
     TypeRegistry typeRegistry = mock(TypeRegistry.class);
     PdxType pdxType = mock(PdxType.class);
     when(pdxType.getPdxField(columnName)).thenReturn(mock(PdxField.class));
@@ -286,7 +279,7 @@ public class RegionMappingTest {
 
   @Test
   public void returnsMappedColumnNameForField() {
-    mapping = new RegionMapping(null, null, null, null, true);
+    mapping = new RegionMapping(null, null, null, null);
     mapping.setFieldMapping(new String[] {fieldName1 + ":" + columnName1});
 
     assertThat(mapping.getColumnNameForField(fieldName1, mock(TableMetaDataView.class)))
@@ -295,7 +288,7 @@ public class RegionMappingTest {
 
   @Test
   public void returnsMappedColumnNameForFieldEvenIfMetaDataMatches() {
-    mapping = new RegionMapping(null, null, null, null, true);
+    mapping = new RegionMapping(null, null, null, null);
     mapping.setFieldMapping(new String[] {fieldName1 + ":" + columnName1});
 
     TableMetaDataView tableMetaDataView = mock(TableMetaDataView.class);
@@ -306,7 +299,7 @@ public class RegionMappingTest {
 
   @Test
   public void returnsMappedFieldNameForColumn() {
-    mapping = new RegionMapping(null, null, null, null, true);
+    mapping = new RegionMapping(null, null, null, null);
     mapping.setFieldMapping(new String[] {fieldName1 + ":" + columnName1});
 
     assertThat(mapping.getFieldNameForColumn(columnName1, null)).isEqualTo(fieldName1);
@@ -314,7 +307,7 @@ public class RegionMappingTest {
 
   @Test
   public void returnsCachedFieldNameForColumn() {
-    mapping = new RegionMapping(null, null, null, null, true);
+    mapping = new RegionMapping(null, null, null, null);
     mapping.setFieldMapping(new String[] {fieldName1 + ":" + columnName1});
 
     TableMetaDataView tableMetaDataView = mock(TableMetaDataView.class);
@@ -326,7 +319,7 @@ public class RegionMappingTest {
 
   @Test
   public void returnsCachedColumnNameForField() {
-    mapping = new RegionMapping(null, null, null, null, true);
+    mapping = new RegionMapping(null, null, null, null);
     mapping.setFieldMapping(new String[] {fieldName1 + ":" + columnName1});
 
     mapping.getFieldNameForColumn(columnName1, null);
@@ -338,7 +331,7 @@ public class RegionMappingTest {
 
   @Test
   public void returnsAllMappings() {
-    mapping = new RegionMapping(null, null, null, null, true);
+    mapping = new RegionMapping(null, null, null, null);
     mapping.setFieldMapping(
         new String[] {fieldName1 + ":" + columnName1, fieldName2 + ":" + columnName2});
 
@@ -352,12 +345,12 @@ public class RegionMappingTest {
   @Test
   public void verifyTwoNonDefaultInstancesAreEqual() {
     RegionMapping rm1 = new RegionMapping("regionName",
-        "pdxClassName", "tableName", "connectionName", true);
+        "pdxClassName", "tableName", "connectionName");
     rm1.setFieldMapping(
         new String[] {fieldName1 + ":" + columnName1, fieldName2 + ":" + columnName2});
 
     RegionMapping rm2 = new RegionMapping("regionName",
-        "pdxClassName", "tableName", "connectionName", true);
+        "pdxClassName", "tableName", "connectionName");
     rm2.setFieldMapping(
         new String[] {fieldName1 + ":" + columnName1, fieldName2 + ":" + columnName2});
 
@@ -367,9 +360,9 @@ public class RegionMappingTest {
   @Test
   public void verifyTwoDefaultInstancesAreEqual() {
     RegionMapping rm1 =
-        new RegionMapping("regionName", null, null, "connectionName", false);
+        new RegionMapping("regionName", null, null, "connectionName");
     RegionMapping rm2 =
-        new RegionMapping("regionName", null, null, "connectionName", false);
+        new RegionMapping("regionName", null, null, "connectionName");
     assertThat(rm1).isEqualTo(rm2);
   }
 
@@ -377,12 +370,12 @@ public class RegionMappingTest {
   @Test
   public void verifyTwoInstancesThatAreEqualHaveSameHashCode() {
     RegionMapping rm1 = new RegionMapping("regionName",
-        "pdxClassName", "tableName", "connectionName", true);
+        "pdxClassName", "tableName", "connectionName");
     rm1.setFieldMapping(
         new String[] {fieldName1 + ":" + columnName1, fieldName2 + ":" + columnName2});
 
     RegionMapping rm2 = new RegionMapping("regionName",
-        "pdxClassName", "tableName", "connectionName", true);
+        "pdxClassName", "tableName", "connectionName");
     rm1.setFieldMapping(
         new String[] {fieldName1 + ":" + columnName1, fieldName2 + ":" + columnName2});
 
@@ -391,7 +384,7 @@ public class RegionMappingTest {
 
   @Test
   public void verifyThatMappingIsEqualToItself() {
-    mapping = new RegionMapping(null, null, null, null, false);
+    mapping = new RegionMapping(null, null, null, null);
     boolean result = mapping.equals(mapping);
     assertThat(mapping.hashCode()).isEqualTo(mapping.hashCode());
     assertThat(result).isTrue();
@@ -399,14 +392,14 @@ public class RegionMappingTest {
 
   @Test
   public void verifyThatNullIsNotEqual() {
-    mapping = new RegionMapping(null, null, null, null, false);
+    mapping = new RegionMapping(null, null, null, null);
     boolean result = mapping.equals(null);
     assertThat(result).isFalse();
   }
 
   @Test
   public void verifyOtherClassIsNotEqual() {
-    mapping = new RegionMapping(null, null, null, null, false);
+    mapping = new RegionMapping(null, null, null, null);
     boolean result = mapping.equals("not equal");
     assertThat(result).isFalse();
   }
@@ -414,9 +407,9 @@ public class RegionMappingTest {
   @Test
   public void verifyMappingWithDifferentRegionNamesAreNotEqual() {
     RegionMapping rm1 =
-        new RegionMapping(null, null, null, null, false);
+        new RegionMapping(null, null, null, null);
     RegionMapping rm2 =
-        new RegionMapping("name", null, null, null, false);
+        new RegionMapping("name", null, null, null);
     boolean result = rm1.equals(rm2);
     assertThat(result).isFalse();
   }
@@ -424,9 +417,9 @@ public class RegionMappingTest {
   @Test
   public void verifyMappingWithDifferentPdxClassNameAreNotEqual() {
     RegionMapping rm1 =
-        new RegionMapping(null, null, null, null, false);
+        new RegionMapping(null, null, null, null);
     RegionMapping rm2 =
-        new RegionMapping(null, "pdxClass", null, null, false);
+        new RegionMapping(null, "pdxClass", null, null);
     boolean result = rm1.equals(rm2);
     assertThat(result).isFalse();
   }
diff --git a/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/SqlToPdxInstanceCreatorTest.java b/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/SqlToPdxInstanceCreatorTest.java
index 7bb2bfc..abac1fd 100644
--- a/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/SqlToPdxInstanceCreatorTest.java
+++ b/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/SqlToPdxInstanceCreatorTest.java
@@ -20,7 +20,6 @@ import static org.mockito.ArgumentMatchers.anyBoolean;
 import static org.mockito.ArgumentMatchers.anyString;
 import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.verifyNoMoreInteractions;
 import static org.mockito.Mockito.when;
@@ -111,33 +110,11 @@ public class SqlToPdxInstanceCreatorTest {
   }
 
   @Test
-  public void readResultOmitsKeyColumnIfNotInValue() throws Exception {
+  public void readResultIncludesKeyColumnInPdxValue() throws Exception {
     setupResultSetForTwoObjectColumns(resultSet);
     when(resultSet.next()).thenReturn(true).thenReturn(false);
     PdxInstanceFactory factory = mock(PdxInstanceFactory.class);
     when(cache.createPdxInstanceFactory(anyString(), anyBoolean())).thenReturn(factory);
-    when(regionMapping.isPrimaryKeyInValue()).thenReturn(false);
-    when(regionMapping.getFieldNameForColumn(eq(COLUMN_NAME_1), any()))
-        .thenReturn(PDX_FIELD_NAME_1);
-    when(regionMapping.getFieldNameForColumn(eq(COLUMN_NAME_2), any()))
-        .thenReturn(PDX_FIELD_NAME_2);
-    tableMetaDataView = mock(TableMetaDataView.class);
-    when(tableMetaDataView.getKeyColumnName()).thenReturn(COLUMN_NAME_1);
-
-    createPdxInstance();
-
-    verify(factory).writeObject(PDX_FIELD_NAME_2, COLUMN_VALUE_2);
-    verify(factory, times(1)).writeObject(any(), any());
-    verify(factory).create();
-  }
-
-  @Test
-  public void readResultIncludesKeyColumnIfPrimaryKeyInValue() throws Exception {
-    setupResultSetForTwoObjectColumns(resultSet);
-    when(resultSet.next()).thenReturn(true).thenReturn(false);
-    PdxInstanceFactory factory = mock(PdxInstanceFactory.class);
-    when(cache.createPdxInstanceFactory(anyString(), anyBoolean())).thenReturn(factory);
-    when(regionMapping.isPrimaryKeyInValue()).thenReturn(true);
     when(regionMapping.getFieldNameForColumn(eq(COLUMN_NAME_1), any()))
         .thenReturn(PDX_FIELD_NAME_1);
     when(regionMapping.getFieldNameForColumn(eq(COLUMN_NAME_2), any()))
diff --git a/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/CreateMappingFunctionTest.java b/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/CreateMappingFunctionTest.java
index 5250419..eac2343 100644
--- a/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/CreateMappingFunctionTest.java
+++ b/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/CreateMappingFunctionTest.java
@@ -66,7 +66,7 @@ public class CreateMappingFunctionTest {
     distributedMember = mock(DistributedMember.class);
     service = mock(JdbcConnectorService.class);
 
-    regionMapping = new RegionMapping(REGION_NAME, null, null, null, null);
+    regionMapping = new RegionMapping(REGION_NAME, null, null, null);
 
     when(context.getResultSender()).thenReturn(resultSender);
     when(context.getCache()).thenReturn(cache);
diff --git a/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/DescribeMappingCommandTest.java b/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/DescribeMappingCommandTest.java
index abdd0d2..0497a0b 100644
--- a/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/DescribeMappingCommandTest.java
+++ b/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/DescribeMappingCommandTest.java
@@ -66,7 +66,7 @@ public class DescribeMappingCommandTest {
         null);
 
     RegionMapping mapping =
-        new RegionMapping("region", "class1", "table1", "name1", true);
+        new RegionMapping("region", "class1", "table1", "name1");
     mapping.getFieldMapping()
         .add(new RegionMapping.FieldMapping("field1", "value1"));
     mapping.getFieldMapping()
@@ -80,7 +80,7 @@ public class DescribeMappingCommandTest {
     gfsh.executeAndAssertThat(command, COMMAND).statusIsSuccess().containsOutput("region", "region")
         .containsOutput("connection", "name1").containsOutput("table", "table1")
         .containsOutput("pdx-name", "class1")
-        .containsOutput("value-contains-primary-key", "true").containsOutput("field1", "value1")
+        .containsOutput("field1", "value1")
         .containsOutput("field2", "value2");
   }
 
diff --git a/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/ListMappingCommandTest.java b/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/ListMappingCommandTest.java
index 678d4d3..3097a7a 100644
--- a/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/ListMappingCommandTest.java
+++ b/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/ListMappingCommandTest.java
@@ -62,14 +62,14 @@ public class ListMappingCommandTest {
         null);
 
     RegionMapping mapping1 =
-        new RegionMapping("region1", "class1", "table1", "name1", true);
+        new RegionMapping("region1", "class1", "table1", "name1");
     mapping1.getFieldMapping()
         .add(new RegionMapping.FieldMapping("field1", "value1"));
     mapping1.getFieldMapping()
         .add(new RegionMapping.FieldMapping("field2", "value2"));
 
     RegionMapping mapping2 =
-        new RegionMapping("region2", "class2", "table2", "name2", true);
+        new RegionMapping("region2", "class2", "table2", "name2");
     mapping2.getFieldMapping()
         .add(new RegionMapping.FieldMapping("field3", "value3"));
     mapping2.getFieldMapping()
diff --git a/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/xml/ElementTypeTest.java b/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/xml/ElementTypeTest.java
index 3943775..6a1cd4d 100644
--- a/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/xml/ElementTypeTest.java
+++ b/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/xml/ElementTypeTest.java
@@ -21,7 +21,6 @@ import static org.apache.geode.connectors.jdbc.internal.xml.JdbcConnectorService
 import static org.apache.geode.connectors.jdbc.internal.xml.JdbcConnectorServiceXmlParser.CONNECTION_NAME;
 import static org.apache.geode.connectors.jdbc.internal.xml.JdbcConnectorServiceXmlParser.FIELD_NAME;
 import static org.apache.geode.connectors.jdbc.internal.xml.JdbcConnectorServiceXmlParser.PDX_NAME;
-import static org.apache.geode.connectors.jdbc.internal.xml.JdbcConnectorServiceXmlParser.PRIMARY_KEY_IN_VALUE;
 import static org.apache.geode.connectors.jdbc.internal.xml.JdbcConnectorServiceXmlParser.TABLE;
 import static org.assertj.core.api.Assertions.assertThat;
 import static org.assertj.core.api.Assertions.assertThatThrownBy;
@@ -79,7 +78,6 @@ public class ElementTypeTest {
     when(attributes.getValue(CONNECTION_NAME)).thenReturn("connectionName");
     when(attributes.getValue(TABLE)).thenReturn("table");
     when(attributes.getValue(PDX_NAME)).thenReturn("pdxClass");
-    when(attributes.getValue(PRIMARY_KEY_IN_VALUE)).thenReturn("true");
     when(regionCreation.getFullPath()).thenReturn("/region");
     stack.push(regionCreation);
 
@@ -90,7 +88,6 @@ public class ElementTypeTest {
     assertThat(regionMapping.getConnectionConfigName()).isEqualTo("connectionName");
     assertThat(regionMapping.getTableName()).isEqualTo("table");
     assertThat(regionMapping.getPdxName()).isEqualTo("pdxClass");
-    assertThat(regionMapping.isPrimaryKeyInValue()).isEqualTo(true);
   }
 
   @Test


Mime
View raw message