>
> I tried to make a view with all the information I have. However, Geoserver
> does not represent this view: I suppose it's because it generates repeated
> records (if the polygon A in the layer has 4 values in the relationship
> table, it appears 4 times in the view). However, if the view has only one
> record for each polygon, it represents well. If this is the problem, *is
> it possible to make a view with a column that uniquely identifies all
> records in it*?
>

You can incorporate the pseudo-column ROWNUM in your view and then create a
PRIMARY KEY constraint  over this column.
Example:

create view INFINITE_VIEW as select rownum as fid, a.geom, b.date from
table1 a, table2 b where a.id = b.fk_id;

ALTER VIEW INFINITE_VIEW
ADD CONSTRAINT INFINITE_VIEW_PK
PRIMARY KEY (fid)
DISABLE NOVALIDATE;

Hope this helps.

-- 
Cumprimentos,
Pedro Mendes
------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to