Не срабатывает addOne
Для базы данных:
<?xml version="1.0" encoding="UTF-8"?>
<model package="OrgEnter" baseClass="xPDOObject" phpdoc-package="orgenter" phpdoc-subpackage="" platform="mysql" defaultEngine="MyISAM" version="1.1">
<object class="NamesList" table="names_list" extends="xPDOSimpleObject">
<field key="smallname" dbtype="varchar" precision="255" phptype="string" null="false" default=""/>
<composite alias="Names" class="Names" local="id" foreign="id" cardinality="one" owner="owner" />
</object>
<object class="Names" table="names" extends="xPDOSimpleObject">
<field key="longname" dbtype="varchar" precision="255" phptype="string" null="false" default=""/>
<index alias="longname" name="longname" primary="false" unique="true" type="BTREE">
<column key="longname" collation="A" null="false" />
</index>
<composite alias="NamesList" class="NamesList" local="id" foreign="id" cardinality="one" owner="foreign" />
</object>
</model>
Код в модели:$orgnamesList= $this->modx->newObject('NamesList');
$orgnamesList->set('smallname',$fields['smallname']);
$orgNames = $this->modx->newObject('Names');
$orgNames->set('longname',$fields['longname']);
$orgnamesList->addOne($orgNames);
$orgnamesList->save();
По какой причине может не цеплять информацию addOne?