Update does not work due to two bugs in PlatformImplBase
--------------------------------------------------------
Key: DDLUTILS-72
URL: http://issues.apache.org/jira/browse/DDLUTILS-72
Project: DdlUtils
Type: Bug
Environment: PostgreSQL 8.1, should be applicable to other platforms also?
Reporter: Vignesh Swaminathan
Assigned to: Thomas Dudziak
Priority: Critical
Platform.update() was failing with exceptions
Two code bugs resulted in the exceptions,
Bug #1
PlatformImplBase method createUpdateSql Line 1279
Currently is
HashMap columnValues = toColumnValues(properties, bean);
return _builder.getUpdateSql(table, columnValues, bean == null);
but should be
HashMap columnValues = toColumnValues(properties, bean);
HashMap pkValues = toColumnValues(primaryKeys, bean);
columnValues.putAll(pkValues);
return _builder.getUpdateSql(table, columnValues, bean == null);
Bug #2
PlatformImplBase Line 1339
for (int idx = 0; idx < properties.length; idx++) should be for (int idx = 0;
idx < primaryKeys.length; idx++)
<vignesh/>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira