From 3735ba152a48bb16c656b0171d873a66340ad823 Mon Sep 17 00:00:00 2001 From: lresende Date: Mon, 24 Aug 2009 18:29:36 +0000 Subject: TUSCANY-3233 - Applying patch from Florian Pinel git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@807331 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/tuscany/das/rdb/graphbuilder/impl/TableData.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'java/das/rdb/src') diff --git a/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/graphbuilder/impl/TableData.java b/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/graphbuilder/impl/TableData.java index f9084f4014..a99f7ff12f 100644 --- a/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/graphbuilder/impl/TableData.java +++ b/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/graphbuilder/impl/TableData.java @@ -98,7 +98,11 @@ public final class TableData { * @return */ public List getPrimaryKeyValues() { - return primaryKey; + // the primary key is kept in the table registry + // so return a copy to prevent deletion + List primaryKeyCopy = new ArrayList(primaryKey.size()); + primaryKeyCopy.addAll(primaryKey); + return primaryKeyCopy; } public boolean hasValidPrimaryKey() { -- cgit v1.2.3