Using doctrine:schema:create I get the following error.

Class Vendor\LeadBundle\Entity\Lead is not a valid entity or mapped
super class.

users entity annotation in src/Vendor/UserBundle/Entity/User.php


namespace Vendor\UserBundle\Entity;
use Vendor\LeadBundle\Entity\Lead;
use Symfony\Component\Security\Core\User\AccountInterface;
use Symfony\Component\Security\Core\User\AdvancedAccountInterface;

/**
 * Vendor\UserBundle\Entity\User
 *
 * @orm:Table(name="users")
 * @orm:UniqueConstraint(name="username_unique", columns={"username"})
 * @orm:Index(name="username_ind", columns={"username"})
 * @orm:Index(name="email_ind", columns={"email"})
 * @orm:Entity
 */
class User implements AdvancedAccountInterface
{

    /**
     * @orm:ManyToMany(targetEntity="Vendor\LeadBundle\Entity\Lead",
inversedBy="users")
     * @JoinTable(name="users_leads",
     *      joinColumns={@JoinColumn(name="user_id",
referencedColumnName="id")},
     *      inverseJoinColumns={@JoinColumn(name="lead_id",
referencedColumnName="id")}
     *      )
     *
     */
    private $leads;


lead entity annotation src/Vendor/LeadBundle/Entity/Lead.php

namespace Vendor\LeadBundle\Entity;
use Vendor\UserBundle\Entity\User;

/**
 * Vendor\LeadBundle\Entity\Lead
 *
 * @orm:Table(name="leads")
 * @orm:Entity
 */
class Lead
{

    /**
     * @var array $users
     *
     * @orm:ManyToMany(targetEntity="Vendor\UserBundle\Entity\User",
mappedBy="leads")
     */
    private $users;


Both bundles are registered in the kernel, and the "vendor" namespace
is mapped to /../src

Is there another step I am missing?
This same scenario works fine within the user bundle but not between
bundles.

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to