[mapguide-trac] #1135: Feature Service API throws exception on
executing some SQL's
MapGuide Open Source
trac_mapguide at osgeo.org
Thu Oct 29 22:28:03 EDT 2009
#1135: Feature Service API throws exception on executing some SQL's
-----------------------+----------------------------------------------------
Reporter: Aleck | Owner: Aleck
Type: defect | Status: new
Priority: low | Milestone:
Component: General | Version: 2.0.2
Severity: trivial | Keywords:
External_id: |
-----------------------+----------------------------------------------------
1. Connect to an Oracle datastore
Executes a SQL statement like the following:
"select (max(f.id))+1 from table f";
You will get an !MgFdoException:
This is becuase in MgServerFeatureUtil::!GetMgProperty method, it is
assumed that the property name will be in the form of
[!TableName].[!FieldName]. And only the !FieldName part will be used as
the property name to get the property value through FDO.
However, this assumption is not necessary and even not correct. Take the
above SQL statement as an example. the property name returned by FDO is
"(max(f.id))+1". However, only the part "id))+1" is used as the property
name. Thus exception occurs.
To fix this, the code that splits the assumed qualified property name is
removed. The property name returned by FDO should be used directly to get
the property value.
--
Ticket URL: <http://trac.osgeo.org/mapguide/ticket/1135>
MapGuide Open Source <http://mapguide.osgeo.org/>
MapGuide Open Source Internals
More information about the mapguide-trac
mailing list