Hi,
Ticking the ”Expose primary keys” checkbox in the datastore settings made the
primary key column appear in the “Feature Type Details” section. Such a simple
solution, but you have to know where to look :-) Thanks!
Kind regards,
Roel De Nijs
Senior Java Developer
Van: Rahkonen Jukka (MML) [mailto:[email protected]]
Verzonden: dinsdag 13 januari 2015 17:02
Aan: Roel De Nijs; [email protected]
Onderwerp: Re: primary key not showing in feature details
Hi,
Check the ”Expose primary keys” option from the setting of the datastore.
Normally primary keys are not exposed because they are used as unique
identifiers in WFS layers and FIDs are important for the system but not for the
users. Especially with WFS-T it would be a very bad idea to let users to edit
FIDs as if they were normal attributes. However, because primary keys are often
made from some attribute like parcel IDs which hold important information. In
that case they can be published with the mentioned option. If you do not want
to publish PK of all the layers from the datastore you have found a workaround
of using a view. Sometimes the PK column must be selected twice to the view,
once for the FID that gets hidden and another time with a different name for
publishing it to the users.
-Jukka Rahkonen-
Roel De Nijs wrote:
Hi list,
When I create a new layer based on a table in a sql server database, all
properties are shown under “Feature Type Details” except for the table column
which is marked as primary key. The definition of this PK column looks like:
[MI_PRINX] [int] IDENTITY(1,1) NOT NULL
When I create a view based on this table (selecting all columns in the table)
and then create a new layer based on this view, I get all columns (including
the primary key one) in the “Feature Type Details” section.
Experiencing this behavior in geoserver 2.4.0, 2.5.2 and 2.6.1 using both
Microsoft’s jdbc drivers sqljdbc4-4.0.2206.100 and sqljdbc41-4.1.5605.100.
Any ideas? A limitation on the name of a PK column?
Kind regards,
Roel De Nijs
Senior Java Developer
[Lähettäjä poisti kuvan. Congres publieke
ruimte]<http://www.congrespubliekeruimte.be>
________________________________
Volg Aquafin op Facebook<https://www.facebook.com/AquafinNV> |
Twitter<https://twitter.com/aquafinnv> |
YouTube<http://www.youtube.com/channel/UCk_4P5BJ-MtEEDCkCsR_KqQ?feature=mhee> |
LinkedIN<http://www.linkedin.com/company/aquafin/products>
Disclaimer: zie www.aquafin.be<http://www.aquafin.be> P Denk aan het milieu.
Druk deze mail niet onnodig af.
------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users