My database is something like this
=== Group ===
id(Pk)
member_id(Fk)
description
=== Member ===
id(Pk)
firstname
lastname
Now I am going to define Member in Groups controller. So there I have defined the Member as like
$members = Members::model()->findAllByPk(array('id','condition'=>'Group=member_id','params'=>array('member_id'=>$member)));
But it is not working and showing error Trying to get property of non-object.Can someone tell me how to make that condition satisfy.
Well seems like you are passing invlaid arguments. See documentation. The first argument should be id (or array of ids), the second condition (or criteria object) and then bound parameters.