Hello , I use models like this
namespace Namespace;
class STable extends \Phalcon\Mvc\Model
{
/**
* @var integer
*/
public $sid;
public function initialize()
{
$this->hasMany("sid", "\Namespace\P", "Sid", array('alias' => 'pdatas'));
}
}
namespace Namespace;
class PTable extends \Phalcon\Mvc\Model
{
/**
* @var integer
*/
public $pid;
/**
* @var integer
*/
public $Sid;
public function initialize()
{
$this->belongsTo("Sid", "\Namespace\STable", "sid", array('alias' => 'sdata'));
}
}
And I can create record use by save() successful , but when I want to update the $Sid it not working , still the same value before
The data below was I try to do:
//Created and fetch
array (size=13)
'pId' => string '11' (length=2)
'Sid' => string '136' (length=3)
'paydate' => string '104/06/29' (length=9)
....
//Try to be ( but Sid still 136 )
array (size=13)
'procurementId' => string '11' (length=2)
'Sid' => string '128' (length=3)
'paydate' => string '104/06/29' (length=9)
....
How can I do?