Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

4.1 Power SQL datasource and nativeName

$
0
0
Hi,

We are trying to upgrade to 4.1 Power edition build 03.30.2014.
After upgrade we get an SQL error when fetching data from some of our datasources.

We are using SQL server, and have datasources that join multiple tables using tableClause and groupClause. Since some of the joined in tables have fields with the same name, we use tableName and nativeName in the field declarations to identify the various fields:

Code:

                <field name="deleted_url" type="link" title="Link to cause for deletion" tableName="deleted_reference" nativeName="url" />
                <field name="approval_url" type="link" title="Link to approval document" tableName="archive_reference" nativeName="url" />

field deleted_url points to the deleted_reference.url and field approval_url points to table archive_reference.url.

In 4.0 SmartGwt generates a query like this:

SELECT COUNT(*) FROM (SELECT archive_reference.url AS approval_url, deleted_reference.url AS deleted_url, [various other fields removed] FROM ...

This query works fine.

However for 4.1 the query is:

SELECT COUNT(*) FROM (SELECT distinct archive_reference.url, deleted_reference.url,[various other fields removed] FROM ...

which gives the following SQL error:
The column 'url' was specified multiple times for 'work'

Any ideas?
Regards
Rolf

Viewing all articles
Browse latest Browse all 4756

Trending Articles