smartGWT 5.0-p20150323
Sort not working for includeFrom field of SQL datasource.
The query generated is wrong, as it adds an alias for the sort field defined with the includeFrom property.
query generated
Sort not working for includeFrom field of SQL datasource.
The query generated is wrong, as it adds an alias for the sort field defined with the includeFrom property.
Code:
<DataSource ID="dsA" serverType="sql" dbName="db" tableName="table_a" >
<fields>
<field name="field_1_a" type="text" nativeName="field_1_a" />
<field name="field_from_other_ds" type="text" includeFrom="dsB.field_1_b" />
</fields>
</DataSource>
<DataSource ID="dsB" serverType="sql" dbName="db" tableName="table_b" >
<fields>
<field name="field_1_b" type="text" nativeName="field_1_b" />
</fields>
</DataSource>
Code:
SELECT *
FROM (SELECT a.*, rownum myrownum
FROM (SELECT table_a.field_1_a AS field_1_a,
table_b.field_1_b AS field_from_other_ds
FROM table_a,
table_b,
WHERE (...)
AND ROWNUM <= 5000
ORDER BY table_b.field_1_b AS field_1_b) a
where rownum <= 75)
WHERE myrownum >= 1
Comment