Hi Isomorpic,
please see the following example (builtInDS-based, 4.1-p20140822),
where the generated SQL does only include the tableName for the normal(=not-included) field.
Changes to animals.ds.xml (1 added, 1 modified):
Changes to BuiltInDS.bindComponents():
Also set boundList.setProgressiveLoading(true); so that the real SELECT-SQL is executed even if the JOIN results in an empty resultset.
The resulting SQL is:
I think it should be employeeTable.Name (or the relatedTableAlias, if given). This happens with HSQLDB as well as with Oracle.
Best regards,
Blama
please see the following example (builtInDS-based, 4.1-p20140822),
where the generated SQL does only include the tableName for the normal(=not-included) field.
Changes to animals.ds.xml (1 added, 1 modified):
Code:
<field name="incName" includeFrom="employees.Name" /> <field foreignKey="employees.EmployeeId" name="lifeSpan" title="Life Span" type="integer" />
Code:
boundList.setDataSource(ds); boundList.setSort(new SortSpecifier[] { new SortSpecifier("incName", SortDirection.ASCENDING), new SortSpecifier("lifeSpan", SortDirection.ASCENDING) });
The resulting SQL is:
Code:
SELECT LIMIT 0 76 animals.userOrder, animals.Name, animals.ReportsTo, animals.scientificName, animals.lifeSpan, animals.status, animals.diet, animals.information, animals.picture, employeeTable.Name AS incName FROM animals, employeeTable WHERE ('1'='1') AND animals.lifeSpan = employeeTable.EmployeeId ORDER BY [B]incName[/B], animals.lifeSpan
Best regards,
Blama
Comment