Skip to content


DDC-2659: Notice: Undefined index: sourceToTargetKeyColumns in /doctrine/orm/lib/Doctrine/ORM/Persisters/BasicEntityPersister .php line 1180 #3395

doctrinebot opened this Issue · 0 comments

2 participants


Jira issue originally created by user tkaplan:

I am getting this error:

 Notice: Undefined index: sourceToTargetKeyColumns

When I try to load my data fixture. There are two ordered fixtures that I'm dealing with: Clients and Users. The client datafixture looks like:

         * {@inheritDoc}
         public function load(ObjectManager $manager)

            for($index = 0; $index < 224; $index <ins></ins>)
                $client = new Client();
                        $this->addReference($index . 'Client', $client);


         public function getOrder()
            return 0;

While the user data fixture looks like:

     $user = New User();
     $client = $this->getReference($index . 'Client');

     // This line is causing the problem

For whatever reason, I don't seem to be having issues with any of my other fixtures. Just this one. I've doubled check the entity relationships which are shown bellow.

My Client.php entity:

     * @ORM\ OneToOne(targetEntity="User", mappedBy="clientAccount")
    protected $user;

My User.php entity:

     * @ORM\ OneToOne(targetEntity="Client", inversedBy="user")
    protected $clientAccount;

There seems to be a bug with the return value of getAssociationMapping() for special conditions when implemented in BasicEntityPersister. The files for my fixtures and entities for this project have been attached.

@beberlei beberlei was assigned by doctrinebot
@doctrinebot doctrinebot added the Bug label
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.