SQLContainer on multi-tables

Hi,
I’m using SQLContainer to select data from 3 table using JOIN operation on database, and even if the query is correct, there’s some property that aren’t shown because have the same propertyId ‘name’.
The ‘name’ column is a property that is present in 2 table, but SQLContainer show only 1, ignoring the second.

How can I show both in my SQLContainer?

Thanks

Hi,

if I remember correctly you can fix this by setting aliases to the columns with similar names, e.g.

select table1.name as t1name, table2.name as t2name from table1, table2

As a result you should get properties named t1name and t2name into the container.

-Tepi

Hi,

Yes, this is the correct solution. I solved yet, while waiting the answer, but thanks a lot.

Have a nice day :wink: