M
M
Maxim2015-09-28 14:39:46
symfony
Maxim, 2015-09-28 14:39:46

What will “targetEntity” look like in Doctrine if you need to link two entities that are in different bundles?

For example

class product
{
    /**
     * @ORM\Id()
     * @ORM\Column(type="integer")
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    protected $id;

    /**
     * @ORM\Column(name="owner_id", type="integer")
     */
    private $owner_id;
}

class Users
{
    /**
     * @ORM\Id()
     * @ORM\Column(type="integer")
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    protected $id;
}

associate owner_id with id
one class in one bundle, the other in another. is there any difference?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis, 2015-09-28
@maxpointn2point

symfony.com/doc/current/cookbook/doctrine/resolve_...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question