[Geoserver-devel] FeatureType vs Tables in a database

Hi,

I implemented a postgis database with 2 tables. A geometry is assigned just
to the first one (table1). The second one (table2) doesn't have any spatial
context... To link both tables, I added a foreign key into the second one
(table1 -> table2).

Now, in the geoserver side, I created a FeatureType that represents table1.

Is it possible to call the GetFeature method and ask for getting attributes
coming from table1 and table2, considering the second table that is linked
to the first table by a foreign key?

Thanks for your support,

Marc-André

I implemented a postgis database with 2 tables. A geometry is assigned just
to the first one (table1). The second one (table2) doesn't have any spatial
context... To link both tables, I added a foreign key into the second one
(table1 -> table2).

Now, in the geoserver side, I created a FeatureType that represents table1.

Is it possible to call the GetFeature method and ask for getting attributes
coming from table1 and table2, considering the second table that is linked
to the first table by a foreign key?

No, that is not yet possible, the Geotools feature model and data io has
hooks to deal with this, but none are implemented yet. It's on the wish
list, but no one has had compelling reason to implement them. One is the
concept of a join, where the attributes would create a joined feature from
the two different table. Another alternative is to have a foriegn key be
a nested feature, that is the attribute would be a feature. I imagine
someone will do so relatively soon, but as far as I know it's not on
anyone's queue right now.

Chris

Thanks for your support,

Marc-André

-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

--