[Geoserver-users] fid generation

Hi list,

when there is no primary key, I believe Geoserver used to generate a fid.

But now looking at the Geoserver 1.6 beta4 output, the feature ids are all
the same in the above case. Something like typename.1, e.g.:

V_KMMARKERINGEN_VWG_NAAM.1

I just checked the same request/response in Geoserver 1.3.X and get
something like:

V_KMMARKERINGEN_VWG_NAAM.5755511b:114f9e97529:-6f30

It can cause problems ofcourse generating a feature collection with features
which all have the same fid ....

Is having a featuretype with no primary key deprecated in 1.6?

Best regards,
Bart

--
Bart van den Eijnden
OSGIS, Open Source GIS
http://www.osgis.nl

Hi Bart,

No, tables with no primary key should still be allowed. With that
version of geoserver what is probably happening is the oid fid mapper is
kicking in. I am not sure but i think oid's are deprecated in older
version of postgres... but still supported from what i can tell.

From my knowledge oid's are database unique. I am not sure if there is a

way to turn off oid fid mapping. Andrea?

-Justin

Bart van den Eijnden (OSGIS) wrote:

Hi list,

when there is no primary key, I believe Geoserver used to generate a fid.

But now looking at the Geoserver 1.6 beta4 output, the feature ids are all
the same in the above case. Something like typename.1, e.g.:

V_KMMARKERINGEN_VWG_NAAM.1

I just checked the same request/response in Geoserver 1.3.X and get
something like:

V_KMMARKERINGEN_VWG_NAAM.5755511b:114f9e97529:-6f30

It can cause problems ofcourse generating a feature collection with features
which all have the same fid ....

Is having a featuretype with no primary key deprecated in 1.6?

Best regards,
Bart

--
Bart van den Eijnden
OSGIS, Open Source GIS
http://www.osgis.nl

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

!DSPAM:4007,473965cc314591637810514!

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

Hi Justin,

I was using an Oracle table and not a PostgreSQL table (should have mentioned that before :slight_smile: ).

Best regards,
Bart

Justin Deoliveira schreef:

Hi Bart,

No, tables with no primary key should still be allowed. With that
version of geoserver what is probably happening is the oid fid mapper is
kicking in. I am not sure but i think oid's are deprecated in older
version of postgres... but still supported from what i can tell.

>From my knowledge oid's are database unique. I am not sure if there is a
way to turn off oid fid mapping. Andrea?

-Justin

Bart van den Eijnden (OSGIS) wrote:
  

Hi list,

when there is no primary key, I believe Geoserver used to generate a fid.

But now looking at the Geoserver 1.6 beta4 output, the feature ids are all
the same in the above case. Something like typename.1, e.g.:

V_KMMARKERINGEN_VWG_NAAM.1

I just checked the same request/response in Geoserver 1.3.X and get
something like:

V_KMMARKERINGEN_VWG_NAAM.5755511b:114f9e97529:-6f30

It can cause problems ofcourse generating a feature collection with features
which all have the same fid ....

Is having a featuretype with no primary key deprecated in 1.6?

Best regards,
Bart

--
Bart van den Eijnden
OSGIS, Open Source GIS
http://www.osgis.nl

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

!DSPAM:4007,473965cc314591637810514!

--
Bart van den Eijnden
OSGIS, Open Source GIS
bartvde@anonymised.com
http://www.osgis.nl

Hi Bart,

Whoops... just assumed :). I dont have an oracle db handy to check this
out, but Andrea might know the answer. Andrea, does oracle have an
equivalent to an oid of sorts?

Bart van den Eijnden (OSGIS) wrote:

Hi Justin,

I was using an Oracle table and not a PostgreSQL table (should have
mentioned that before :slight_smile: ).

Best regards,
Bart

Justin Deoliveira schreef:

Hi Bart,

No, tables with no primary key should still be allowed. With that
version of geoserver what is probably happening is the oid fid mapper is
kicking in. I am not sure but i think oid's are deprecated in older
version of postgres... but still supported from what i can tell.

>From my knowledge oid's are database unique. I am not sure if there is a
way to turn off oid fid mapping. Andrea?

-Justin

Bart van den Eijnden (OSGIS) wrote:
  

Hi list,

when there is no primary key, I believe Geoserver used to generate a fid.

But now looking at the Geoserver 1.6 beta4 output, the feature ids are all
the same in the above case. Something like typename.1, e.g.:

V_KMMARKERINGEN_VWG_NAAM.1

I just checked the same request/response in Geoserver 1.3.X and get
something like:

V_KMMARKERINGEN_VWG_NAAM.5755511b:114f9e97529:-6f30

It can cause problems ofcourse generating a feature collection with features
which all have the same fid ....

Is having a featuretype with no primary key deprecated in 1.6?

Best regards,
Bart

--
Bart van den Eijnden
OSGIS, Open Source GIS
http://www.osgis.nl

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

Justin Deoliveira ha scritto:

Hi Bart,

Whoops... just assumed :). I dont have an oracle db handy to check this
out, but Andrea might know the answer. Andrea, does oracle have an
equivalent to an oid of sorts?

Nope, nothing... I don't know what's going on in fact, since
if a Feature is generated without an ID it should use UUID
to create a fake one, and it would look exactly like the
one generated in GeoServer 1.5.x... I guess some investigation
is needed.

Cheers
Andrea

Bart van den Eijnden (OSGIS) ha scritto:

Hi Justin,

I was using an Oracle table and not a PostgreSQL table (should have mentioned that before :slight_smile: ).

Bart, I tried out with one of my tables but could not reproduce.
Say I have a working table with a primary key called shapes, I did
something like:

create table shapesnopk as select * from shapes
insert into USER_SDO_GEOM_METADATA select 'SHAPESNOPK', COLUMN_NAME, DIMINFO, SRID from user_sdo_geom_metadata where table_name = 'SHAPES'

This way I created a spatial clone with no pk, which I then queried
with wfs:
http://localhost:8080/geoserver/wfs?service=WFS&request=GetFeature&typeName=topp:SHAPESNOPK
and the fids I got back looked like:
shapesnopk.nfm--25fa8814_1163e66b9c2_-8000

So it works for me, with the latest nightly. Are you sure that table
really has no pk?
Cheers
Andrea