Hi,
Im trying get all rows from my table "Product", but my model has one relation:
'sites' => array(self::MANY_MANY, 'Site', 'product_site(product_id, site_id)'),
And when i try get all data from the table using "findAll", i have a strange behavior. Example:
THIS CODE RETRIVE ALL ROWS CORRECTLY
$list = Product::model()->with('sites')->findAll();
[/code]
THIS GENERATE A QUERY WITHOUT THE RELATION - ONLY BECAUSE I PUT THE CRITERIA THAT CONTAINS SOME CONDITIONS TO "WHERE"
$list = Product::model()->with('sites')->findAll($criteria);
[/code]
What can be the problem?