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

Enhancement: table-alias attribute in .ds.xml files (DataSource or DataSourceField)

$
0
0
Hi Isomorphic,

I'd like to suggest a new attribute for http://www.smartclient.com/smartgwte...ataSource.html. I think an attribute "alias" could be useful here.
It would act the following: If given, the generated <tableClause> is "FROM tablename alias" (or "JOIN tablename alias ON ...") and all column accesses (in fieldlist and criterialist) in generated would be like "alias.columname" instead of "table.columname".

Reason: If I right now have a table that has 2 FK to the same table, I can't include fields from both joined tables, as it is currently not possible to tell them apart.
This way I could create .ds.xml file stubs for the linked table with just the alias and a inheritsFrom.
Currently I have to do this and also create a view with "select * from base_table" or to write the <tableClause> with join in XML on my own and use the field-level attribute "tableName".

A even better solution would involve an additional attribute on the field level, where I can give a renameTo in addition to foreignKey.

What do you think of the suggestion?

Best regards,
Blama

Viewing all articles
Browse latest Browse all 4756

Trending Articles