No, that is not a database table. That example uses a property file (see 
where it says "Geologic Event property file"), in which the id is taken 
from the key of each row in the file. This is different to the behaviour 
of a JDBC database (such as postgis), in which the default feature id is 
generated as I described (tablename.N).

If you want to set a different id from the default, use idExpression in 
the mapping for the top level type to set the gml:id from a column.
http://docs.geoserver.org/latest/en/user/data/app-schema/mapping-file.html#idexpression

Note that this can't be just an integer column as it must be an NCName. 
Using OCQL to generate the id is inefficient and, even worse, prevents 
the use of indices. I recommend creating your id in the database and 
indexing it for best performance.

Kind regards,
Ben.


On 19/03/12 17:40, alessandro marrone wrote:
> http://docs.geoserver.org/latest/en/user/data/app-schema/feature-chaining.html#configure-nesting-on-the-nested-feature-type
>
> for what you say, the feature chaining should fail because the id values of 
> Geologic table
>
>> Date: Mon, 19 Mar 2012 17:24:56 +0800
>> From: [email protected]
>> To: [email protected]
>> CC: [email protected]
>> Subject: Re: [Geoserver-users] strange comportment getId() with application 
>> schema
>>
>> On 19/03/12 17:13, alessandro marrone wrote:
>>> hello
>>> I'm mapping some feature contained in a postgis db, when i call getId() 
>>> from the mapping file, it returns a value like this:<table name>.<key value>
>>> I checked the examples in the documentation and it should return just the 
>>> key value.
>>
>> Where in the documentation? That might be a mistake.
>>
>> CQL getId() creates a feature id (e.g. gml:id) which must be an NCName
>> (cannot be a number). Because keys are commonly integers, for a simple
>> source feature GeoServer prepends the table name (and a ".") to make a
>> unique gml:id that is a valid NCName.
>>
>> Kind regards,
>>
>> --
>> Ben Caradoc-Davies<[email protected]>
>> Software Engineer
>> CSIRO Earth Science and Resource Engineering
>> Australian Resources Research Centre
>

-- 
Ben Caradoc-Davies <[email protected]>
Software Engineer
CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to