Ambiguous field

Hi,

i’m using

$criteria->with = array(‘table2’);

It’s fine, but my table1 and the table2 have the created_by field, when i try to do a compare (‘created_by’, 1); it says its ambiguous (ok)… but if i try to put table1.created_by it dont work, i tried the tablename and the model name, how can i do that.

I’m doing that in the table1 Model

Thanks.

try t.created_by to refer to created_by in table1 instead of using table1.created_by.