That won’t work because relations require you to pass in 3 parameters (relation type/class, AR class, FK), then it builds out the necessary criteria and joins for you. I guess you keep both from and to relations and just create a method inside your model that would use those 2 and bring back an array with all the data you need.
declare a method on your person model like so it give you more control over conditions
public function getTransactions()
{
$criteria = new CDbCriteria;
$criteria->condition = '`transaction`.`personFrom_id` = :id OR `agreements`.`personTo_id` = :id';
$criteria->params = [':id' => $this->primaryKey];
return Transaction::model()->findAll($criteria);
}
// you are still able to do
$person->transactions
// Note: double check your relation ids