Sortable behaviour - wrong Peer classname #378

aurnot opened this Issue Jun 7, 2012 · 0 comments


None yet

2 participants

aurnot commented Jun 7, 2012

I have a class Field which is sortable.
When calling

$field->insertAtRank($rank); // $rank is a number lower than maxRank
// or
$field->insertAtTop(); // ... $field->save();

it fails and this error is thrown:

Warning: call_user_func_array() expects parameter 1 to be a valid callback, 
class 'FieldPeer' not found in ***\Model\om\BaseField.php line 1750

The line refers to the following function

 * Execute queries that were saved to be run inside the save transaction
protected function processSortableQueries($con)
    foreach ($this->sortableQueries as $query) {
        $query['arguments'][]= $con;
        call_user_func_array($query['callable'], $query['arguments']);
    $this->sortableQueries = array();

It seems that the base class doesn't use the full path to the peer class :s

@willdurand willdurand pushed a commit that closed this issue Jun 11, 2012
@aurnot aurnot fix #378 change for self::PEER 0661d18
@rozwell rozwell added a commit to rozwell/Propel that referenced this issue Aug 12, 2012
@rozwell rozwell Applied fix #378 change for self::PEER 7e169b3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment