I'm using Isomorphic SmartClient/SmartGWT Framework (v9.0p_2013-09-17/Pro Deployment 2013-09-17)
I see in http://www.smartclient.com/smartgwtee-latest/javadoc/com/smartgwt/client/docs/serverds/DataSourceField.html it says "A foreignKey declaration must exist between the two DataSources, establishing either a 1-to-1 relationship or a many-to-1 relationship from this DataSource to the related DataSource. The inclusion can be indirect (traverse multiple DataSources) so long as there is a chain of foreignKey declarations from the target DataSource to the DataSource where the includeFrom field is declared. "
but I can't find any example of how to set things up to "traverse multiple DataSources". I *think* this is what I need for my scenario...
I have table A that has a FK into table B which has a FK into table C. When querying the DataSource for table A, I want to be able to access name from table C... example DB setup:
I have the basic FK relationship working from A into B (and even C) with
<field name="b_id" foreignKey="B.id"/>
<field name="c_id" includeFrom="B.C_id"/>
but now how do I make the jump to C.name? My goal is to have the results rows from the A datasource come back with C.name like:
id|B_id|C_id|C.name
Thanks,
Brian
I see in http://www.smartclient.com/smartgwtee-latest/javadoc/com/smartgwt/client/docs/serverds/DataSourceField.html it says "A foreignKey declaration must exist between the two DataSources, establishing either a 1-to-1 relationship or a many-to-1 relationship from this DataSource to the related DataSource. The inclusion can be indirect (traverse multiple DataSources) so long as there is a chain of foreignKey declarations from the target DataSource to the DataSource where the includeFrom field is declared. "
but I can't find any example of how to set things up to "traverse multiple DataSources". I *think* this is what I need for my scenario...
I have table A that has a FK into table B which has a FK into table C. When querying the DataSource for table A, I want to be able to access name from table C... example DB setup:
Code:
table A
id|B_id
table B
id|C_id
table C
id|name<field name="b_id" foreignKey="B.id"/>
<field name="c_id" includeFrom="B.C_id"/>
but now how do I make the jump to C.name? My goal is to have the results rows from the A datasource come back with C.name like:
id|B_id|C_id|C.name
Thanks,
Brian