I can confirm this is still an issue. I found the culprit in the source code.
My two related models:
class TestingJobEndpoint extends \Phalcon\Mvc\Model
public function initialize()
{
$this->belongsTo("job_id", "TestingJob", "id");
$this->belongsTo("endpoint_id", "TestingEndpoint", "id");
$this->hasMany(array('job_id', 'endpoint_id'), 'TestingJobEndpointSla', array('jobId', 'endpointId'), array('alias' => 'Slas'));
}
}
class TestingJobEndpointSla extends \Phalcon\Mvc\Model
...
public function initialize()
{
$this->belongsTo(array('jobId', 'endpointId'), 'TestingJobEndpoint', array('job_id', 'endpoint_id'), array('alias' => 'JobEndpoint'));
$this->belongsTo('endpointId', 'TestingEndpoint', 'id', array('alias' => 'LocalEndpoint'));
}
Source Code
static PHP_METHOD(Phalcon_Mvc_Model, _postSaveRelatedRecords){
...
if (Z_TYPE_P(columns) == IS_ARRAY) {
PHALCON_CALL_METHOD(NULL, connection, "rollback", nesting);
PHALCON_THROW_EXCEPTION_STR(phalcon_mvc_model_exception_ce, "Not implemented");
return;
}
...
}