Strange behavior when implicitly defining relationships on save

I've found that implicit relationship model saving is not consistent if certain steps are done first. I'm not sure if this is a Phalcon 2.0 issue because its new territory for me.

This works for me

$scrib = Records::factory('scrib');
$scrib->blobgroup = new Blobgroups();
$scrib->create();

but this doesn't work

$scrib = Records::factory('scrib');

// This calls the setter and causes the relationship to no longer be saveable
$blobgroup = $scrib->blobgroup;

$scrib->blobgroup = new Blobgroups();
$scrib->create();


44.7k

The problem is that there is no way to check if a relationship is being set because attempting to access it causes it to be unable to be saved.