tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdan...@apache.org
Subject svn commit: r451016 - in /incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb: config/wrapper/TableWrapper.java generator/impl/UpdateGenerator.java
Date Thu, 28 Sep 2006 20:22:49 GMT
Author: bdaniel
Date: Thu Sep 28 13:22:48 2006
New Revision: 451016

URL: http://svn.apache.org/viewvc?view=rev&rev=451016
Log:
Fix an issue where the generated "update" statement is incorrectly using the managed OCC column's
property name rather than its column name

Modified:
    incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/config/wrapper/TableWrapper.java
    incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/generator/impl/UpdateGenerator.java

Modified: incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/config/wrapper/TableWrapper.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/config/wrapper/TableWrapper.java?view=diff&rev=451016&r1=451015&r2=451016
==============================================================================
--- incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/config/wrapper/TableWrapper.java
(original)
+++ incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/config/wrapper/TableWrapper.java
Thu Sep 28 13:22:48 2006
@@ -125,4 +125,14 @@
 		return null;
 		
 	}
+
+	public Column getManagedColumn() {
+		Iterator i = table.getColumn().iterator();
+		while (i.hasNext()) {
+			Column c = (Column) i.next();
+			if (c.isManaged())
+				return c;
+		}
+		return null;
+	}
 }

Modified: incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/generator/impl/UpdateGenerator.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/generator/impl/UpdateGenerator.java?view=diff&rev=451016&r1=451015&r2=451016
==============================================================================
--- incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/generator/impl/UpdateGenerator.java
(original)
+++ incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/generator/impl/UpdateGenerator.java
Thu Sep 28 13:22:48 2006
@@ -81,9 +81,10 @@
 			}
 		}
 
-		if ( t.getManagedColumnPropertyName() != null ) {
+		Column c = t.getManagedColumn();
+		if ( c != null ) {
 			statement.append(", ");
-			statement.append(t.getManagedColumnPropertyName());
+			statement.append(c.getColumnName());
 			statement.append(" = ?");
 			managedProperties.add(changedObject.getProperty(t.getManagedColumnPropertyName()));
 		}



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org


Mime
View raw message