[Geoserver-users] primary key requirement

Hi list,

is it definite that there is gonna be a requirement for primary keys for
tables and views to be used by Geoserver/Geotools?

I can imagine this requirement for the transactional situation, but for
basic WFS operation it can be a bit of a pain.

We also found out that the primary key needs to be integer and cannot be
string based.

For instance, for views only containing string columns, we need to add
something dummy like SELECT MYFIELD1, MYFIELD2, 1 AS FID FROM TABLE to the
view definition and set FID as the primary key.

Best regards,
Bart

Bart van den Eijnden (OSGIS) wrote:

is it definite that there is gonna be a requirement for primary keys for
tables and views to be used by Geoserver/Geotools?

I can imagine this requirement for the transactional situation, but for
basic WFS operation it can be a bit of a pain.

I strongly agree.

Moreover, not every DBMS supports PK on Views (DB2, for instance, doesn't).

Regards,

--------------------
    Luca Morandini
www.lucamorandini.it
--------------------

Bart van den Eijnden (OSGIS) wrote:

Hi list,

is it definite that there is gonna be a requirement for primary keys for
tables and views to be used by Geoserver/Geotools?

I can imagine this requirement for the transactional situation, but for
basic WFS operation it can be a bit of a pain.

We also found out that the primary key needs to be integer and cannot be
string based.

For instance, for views only containing string columns, we need to add
something dummy like SELECT MYFIELD1, MYFIELD2, 1 AS FID FROM TABLE to the
view definition and set FID as the primary key.

No, we don't want that to be a requirement, there was no good reason for GeoTools not working properly. I'll go so far as to put as a blocker before we go RC1:

http://jira.codehaus.org/browse/GEOS-731

Chris

Best regards,
Bart

-------------------------------------------------------------------------
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
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

!DSPAM:1003,4524d253238921702038478!

--
Chris Holmes
The Open Planning Project
http://topp.openplans.org

Bart van den Eijnden (OSGIS) ha scritto:

Hi list,

is it definite that there is gonna be a requirement for primary keys for
tables and views to be used by Geoserver/Geotools?

I can imagine this requirement for the transactional situation, but for
basic WFS operation it can be a bit of a pain.

We also found out that the primary key needs to be integer and cannot be
string based.

For instance, for views only containing string columns, we need to add
something dummy like SELECT MYFIELD1, MYFIELD2, 1 AS FID FROM TABLE to the
view definition and set FID as the primary key.
  

Guys, good news, the patches are already in, David Adler fixed this for us on gt2 2.2.x.
Now we only need to wait for gt2 2.2.1 release. Geoserver 1.4.0rc1 will depend on that
gt2 2.2.1, so you should get the fix along with the release.
If you're impatient, build gt2 2.2.x, build geoserver trunk changing the dependency to 2.2.1-SNAPSHOT
and enjoy the fixes today.

Cheers
Andrea

Cool! I'll wait for RC1 though :-), I had already adapted all our views in the process.

Thanks for the quick action Chris and Andrea (and David ofcourse).

Best regards,
Bart

aaime@anonymised.com schreef:

Bart van den Eijnden (OSGIS) ha scritto:

Hi list,

is it definite that there is gonna be a requirement for primary keys for
tables and views to be used by Geoserver/Geotools?

I can imagine this requirement for the transactional situation, but for
basic WFS operation it can be a bit of a pain.

We also found out that the primary key needs to be integer and cannot be
string based.

For instance, for views only containing string columns, we need to add
something dummy like SELECT MYFIELD1, MYFIELD2, 1 AS FID FROM TABLE to the
view definition and set FID as the primary key.
  

Guys, good news, the patches are already in, David Adler fixed this for us on gt2 2.2.x.
Now we only need to wait for gt2 2.2.1 release. Geoserver 1.4.0rc1 will depend on that
gt2 2.2.1, so you should get the fix along with the release.
If you're impatient, build gt2 2.2.x, build geoserver trunk changing the dependency to 2.2.1-SNAPSHOT
and enjoy the fixes today.

Cheers
Andrea

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