JDBCTextFeatureWriter encodes the AttributeType instead of its value

Description

JDBCTextFeatureWriter::makeUpdateSql(Feature, Feature) creates a wrong update statement, since it uses the toString() of the AttributeType as value instead of the value of that attribute on the feature:

if (attributes
{
String geomName = attributes[i].getName();
int srid = ftInfo.getSRID(geomName);
attrValue = getGeometryInsertText((Geometry) currAtt, srid);
}
else
{
attrValue = addQuotes(attributes[i]); //this is the wrong line
}

this ends up in a statement like: UPDATE <table> SET <attr> = 'DefaultAttributeType

Environment

None

Activity

Show:
codehaus
April 10, 2015, 3:22 PM

CodeHaus Comment From: groldan - Time: Fri, 29 Jul 2005 13:16:42 -0500
---------------------
fixed at revision #14982 for 2.1.x and #14983 for trunk.

Assignee

Unassigned

Reporter

codehaus

Triage

None

Components

Fix versions

Affects versions

Priority

High
Configure