Hi,
an interesting discussion about mapping primary keys as feature attributes
is going on on the geoserver users mailing list:

http://www.nabble.com/No-primary-key-from-getFeatureType--Sec%3DUnclassified--tf2373271.html

Now, we know that this may be dangerous, but it's a legitimate request 
nevertheless.
I would like to setup a parameter in jdbc data store factories that 
allows the
addition of primary key columns into the feature type.

The DefaultFIDMapperFactory factory has a constructor parameter that 
allows to enable
primary key inclusion, but the path from datastore factory to the fid 
mapper factory is a bit
convoluted.

I propose to add the parameter to JdbcDatastoreConfig, and then have the
JDBC1DataStore.buildFIDMapperFactory(config) method use that parameter
to build a fid mapper factory that uses the extra parameter.
Then all the jdbc data store constructors and factories should be 
changed to handle
the new parameter:

static final Param INCLUDEPK = new Param("Pk inclusion", Boolean.class, 
"Wheter to include the primary key in the feature or not", false);

If jdbc module mantainers to agree with this strategy I can go on and 
provide
the fix for both 2.2.x and 2.3.x. Please respond promptly, as I'd like 
to ship
this fix along with geoserver 1.4.0rc1 if possible.

Cheers
Andrea

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to