CSort with relations and ambiguous columns

Hi,

today i’m having yet another problem… oh - i mean: challenge  :D

I have a model with a 1:N relation and both tables are having a column named 'description'. Now i want to use sorting but i always get the sql error "ambiguous column name 'description' in order clause".

A look at the sql statement shows that there is just the column name in the order-clause without a table alias…

I tried different things with the CSort attributes property, but it didn’t worked.  :(

How is it possible to tell Yii to set the corresponding table alias?

greetings

You may refer to this post: http://www.yiiframew…38.html#msg2738

Don't know how i could have missed this topic - it was exactly what i'm looking for!

Thanks Qiang.