Adding entry type using setContentFromPost I'm creating a new user using $user-&gt;setContentFromPost(). It all works fine except I can't attach an entry to an Entries field.

$user = new UserModel();
$user-&gt;username         = $email;
$user-&gt;email            = $email;
$user-&gt;unverifiedEmail  = $email;

$user-&gt;setContentFromPost(array(
  'companyName' =&gt; $admin-&gt;companyName, 
  'companyId' =&gt; $admin-&gt;companyId, 
  'partnerManager[]' =&gt; $admin-&gt;partnerManager[0]-&gt;id
));


This will create user but the partnerManager Entries field will be empty. I've tried a few different syntax variations, but none of them seem to work:

'fields[partnerManager][]' =&gt; $admin-&gt;partnerManager[0]-&gt;id
'partnerManager' =&gt; $admin-&gt;partnerManager[0]-&gt;id
'partnerManager[0]' =&gt; $admin-&gt;partnerManager[0]-&gt;id


How to fill this field?
Relationships are always added as arrays of IDs, even if you are only relating a single element:

$user-&gt;setContentFromPost(array(
    'companyName' =&gt; $admin-&gt;companyName, 
    'companyId' =&gt; $admin-&gt;companyId, 
    'partnerManager' =&gt; array($admin-&gt;partnerManager[0]-&gt;id)
));