ID-Filter does work different with different datastores
-------------------------------------------------------
Key: GEOT-1948
URL: http://jira.codehaus.org/browse/GEOT-1948
Project: GeoTools
Issue Type: Bug
Components: data, data jdbc, data mysql, data shapefile
Affects Versions: 2.4.2
Environment: Windows XP, 1.6, MySQL
Reporter: Michael Fröhler
When using an ID-filter against a shape datastore I have to use following
format to find the Feature with a certain ID:
SHAPFILE.ID (e.g "DEMOSHAPE.15")
When I get a feature of shape datastore Feature.getID() returns the same format
e.g. "DEMOSHAPE.15".
example:
FilterFactory2
ffac=CommonFactoryFinder.getFilterFactory2(GeoTools.getDefaultHints());
HashSet setFID=new HashSet();
setFID.add("DEMOSHAPE.15");
Filter filt=ffac.id(setFID);
When using an ID-filter against a database datastore (I used MySQL Datastore)
this does not work.
A feature of MySQL and I suppose any other JDBC based datastore returns the
format TABLENAME.PRIMARY_KEY_VALUE when calling Feature.getID() - e. g.
"DEMOTABLE.12".
When i use the ID-filter in this case i cannot use the same format I get from
Feature.getID().
This example will return no result!!!
-------------------------------------------
FilterFactory2
ffac=CommonFactoryFinder.getFilterFactory2(GeoTools.getDefaultHints());
HashSet setFID=new HashSet();
setFID.add("DEMOTABLE.12");
Filter filt=ffac.id(setFID);
-----------------------------------------------
It only works when I use - setFID.add("12");
Best regards
Michael
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel