$post=Post::model()->with('tags')->findbyPk(0);
if(isset($post) && empty($post->title))
throw new CException('null found');
$post=Post::model()->with('tags')->findbyPk(0);
if(isset($post) && empty($post->title))
throw new CException('null found');
Could you please create a ticket for this? Thanks!
nope, sorry
i don't like google
That’s interesting. Anyway, thank you for finding out this bug. Will fix it very soon.
Qiang,
the fix for this somehow seems to break eager fetching of multiple related tables:
<?php $list=Time::model()->with('unit','project')->findAll($criteria);
My criteria contains conditions for the related tables ('project.customerID=:customerID'). I now get an error:
CDbException
Description
CDbCommand konnte das SQL-Statement nicht ausführen: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'Project.customerID' in 'where clause'
When i look at the logged SQL, only the first table (Unit) is JOINed.
Thanks. Fixed.