On 03/03/2011, at 5:26 PM, Ben Caradoc-Davies wrote: > Shaw, > > PostGIS maps all unquoted identifiers to lowercase. You must call your table "locality" (without the quotes) in your mapping if your table is really called "locality". Please use pgadmin3 or psql \dt to confirm your table name, as the mapping file is case-sensitive. > > app-schema supports one-to-many mapping, either via feature chaining or via multi-valued simple properties (you could use a denormalised view to deliver these). > > Kind regards, > Ben. > > > On 03/03/11 14:19, Shaw Innes wrote: >> Hi, >> I have been trying to work out the best way to represent some relational data in WFS. Initially it seemed simple to just flatten the data, however I now have a requirement to represent a number of multi-select values in my structure. >> >> I have the following data model represented in PostGIS: >> >> A locality table containing my geometry, a point feature >> >> ID | integer | >> NewID | integer | >> Code | integer | >> Category | character varying(100) | >> Name | character varying(100) | >> State | character varying(100) | >> Status | character varying(100) | >> PostCode | character varying(100) | >> TheGeom | geometry | >> >> and an attributes table: >> >> LocalityID | integer | >> Type | character varying(100) | >> Value | character varying(100) | >> Description | character varying(100) | >> >> >> The two tables are joined on the Locality.ID to Attributes.LocalityID in a 1 to Many relationship. >> >> I would like to use app schemas to allow searching for localities based on spatial query (BBOX etc) and attributes also. >> >> I have tried to piece together some mappings using GeoSever 2.1RC1 but I can't seem to get it to work. >> >> in my mapping XML file I have the following: >> >> >> >> datastore >> Locality >> >> >> >> But when I try to save the data store definition in Geoserver it tells me: >> >> Feature type Locality not found. Has the data access been registered in DataAccessRegistry? Available: [] >> >> My questions are basically: >> >> 1. is App Schema the right way to do this? >> 2. can I perform a 1:m join using feature type mappings? >> 3. can I do this using PostGIS data sources? >> >> Any guidance would be greatly appreciated. >> >> Thanks >> >> Shaw >> > > -- > Ben Caradoc-Davies > Software Engineering Team Leader > CSIRO Earth Science and Resource Engineering > Australian Resources Research Centre