[Geoserver-users] No primary key from getFeatureType [Sec=Unclassified]

Hi all,

When I do request a describeFeatureType, the attribute set as the
primary key doesn't show up - is this normal behavior?

I've been looking through the WFS spec, trying to find if it is correct
behavior but I can't find anywhere that says to omit it.

To reproduce:
http://aadc-dev.aad.gov.au/geoserver/wfs?Request=describeFeatureType&Typ
eName=aadc:AWS_PT

This feature should have an element called 'UFI' which is the primary
key for that dataset in Oracle 10g.

Should it show up or is it correct in not doing so (the same happens for
all other featuretypes)?

Miles
___________________________________________________________________________

    Australian Antarctic Division - Commonwealth of Australia
IMPORTANT: This transmission is intended for the addressee only. If you are not the
intended recipient, you are notified that use or dissemination of this communication is
strictly prohibited by Commonwealth law. If you have received this transmission in error,
please notify the sender immediately by e-mail or by telephoning +61 3 6232 3209 and
DELETE the message.
        Visit our web site at http://www.aad.gov.au/
___________________________________________________________________________

Miles Jordan ha scritto:

Hi all,

When I do request a describeFeatureType, the attribute set as the
primary key doesn't show up - is this normal behavior?

I've been looking through the WFS spec, trying to find if it is correct
behavior but I can't find anywhere that says to omit it.

To reproduce:
http://aadc-dev.aad.gov.au/geoserver/wfs?Request=describeFeatureType&Typ
eName=aadc:AWS_PT

This feature should have an element called 'UFI' which is the primary
key for that dataset in Oracle 10g.

Should it show up or is it correct in not doing so (the same happens for
all other featuretypes)?
  

That's the default for JDBC data stores, to not include the primary key columns in the
feature type. The gt2 API allows to have the primary key attributes included in the
feature as a datastore wide setting, but no datastore so far makes it configurable at the
factory level, so Geoserver can't provide you that setting.

If you need key among the attributes, open a jira issue against this problem.
Btw, primary key does not appear among the attributes, but is available in the FID,
the feature id. Is that enough for you?

Cheers
Andrea Aime