[Geoserver-devel] [jira] (GEOS-5618) By enabling applicaiton schema joining support, WFS getfeature request on parent table returns all child records only for first parent record!- Incorrect response

Amir Nasr created BugGEOS-5618
By enabling applicaiton schema joining support, WFS getfeature request on parent table returns all child records only for first parent record!- Incorrect response

Issue Type:

BugBug

Affects Versions:

2.2.4

Assignee:

Rini Angreani

Attachments:

join_support_bug.zip

Components:

Application schema

Created:

30/Jan/13 3:47 AM

Description:

I created sample complex feature layer based on tutorial provided in app-schema plugin which configured to connect to one parent and child table in database with limited records.
The WFS getfeature works fine with these limited number of records and shows child mapped elements correctly for each parent record.

Then I tried to test its performance with much larger records (1460 records for parent table, 45000 records for child table), calling getfeature on child table returns GML records after one minute but when I call getfeature on parent table ,CPU goes up around 70 percent and remain there for more than 10 minute and no respone even after this waiting period.

I found out that maybe I should use joining support by setting -Dapp-schema.joining=true in startup.sh of GeoServer.

After enabling joining support, even for the first sample (limited records), causes INCORRECT response to return by calling WFS getfeature for parent table.
Indeed it returns all child records as child mapped elements of first parent record in its GML response and no child mapped elements for other parent records (See the INCORRECT_RESPONSE.xml)

I also attached all of the GeoServer workspace content and sample tables DML and DDL.

To simulate test environment, you need to follow below steps.
1- Install GeoServer 2.2.4
2- Apply Application Schema plugin 2.2.4
3- Use the attached folder as GEOSERVER_DATA_DIR
4- Create sample parent and child table
5- Change database configuration (like IP,username ,password) in testptv_mini_tbllinesstops.xml and estptv_mini_tblline_main_operator_gen.xml
located in workspaces folder.
5- Edit startup.sh of GeoServer and add -Dapp-schema.joining=true as JVM argument in the last line
6- start server
7-Call getfeature for parent table like
http://IP/geoserver/ows?service=wfs&version=1.1.0&request=getfeature&typename=testptv:testptv_tblline_main_operator_gen

Parent Table: testptv_tblline_main_operator_gen
Child Table: tbllinesstops
Linking Column: lineid

All of the foreing key , unique key and index have been created.

Environment:

Application Schema plugin for GeoServer version 2.2.4
OS: Ubuntu 64 Bit,
java version “1.6.0_32”
Java™ SE Runtime Environment (build 1.6.0_32-b05)
Java HotSpot™ 64-Bit Server VM (build 20.7-b02, mixed mode)

Project:

GeoServer

Priority:

MajorMajor

Reporter:

Amir Nasr

This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your [JIRA administrators](https://jira.codehaus.org/secure/ContactAdministrators!default.jspa). For more information on JIRA, see: [http://www.atlassian.com/software/jira](http://www.atlassian.com/software/jira)