orbisgis / h2gis-geotools

H2GIS Datastore for the Geotools library
GNU Lesser General Public License v3.0
1 stars 5 forks source link

SimpleFeatureStore.addFeatures() does not return AutoGenerated IDs #17

Closed ccarlow closed 4 years ago

ccarlow commented 4 years ago

The feature id list returned by SimpleFeatureStore.addFeatures() contains nulls. For example, FORESTS.null. Other Dialects return featureIds by overriding lookupGeneratedValuesPostInsert().

Pull request #16 includes the overridden lookupGeneratedValuesPostInsert() which returns true.

Note that the featureId that is returned by AutoGenerated Integer IDs in in the form .. So inserting a record into FORESTS will return FORESTS.1 instead of the actual integer value 1.

I read somewhere that this is normal behavior within geotools for some reason. I'll post the article if I come across it again for reference.