Symfony 未定义索引:UnitOfWork.php第2873行
我用的是FOSUserBundle和Symfony2。我正在尝试使用注册电子邮件确认功能。当我点击/confirmation/{confirmationToken}url时,原则抛出以下异常Symfony 未定义索引:UnitOfWork.php第2873行,symfony,doctrine-orm,fosuserbundle,Symfony,Doctrine Orm,Fosuserbundle,我用的是FOSUserBundle和Symfony2。我正在尝试使用注册电子邮件确认功能。当我点击/confirmation/{confirmationToken}url时,原则抛出以下异常 Notice: Undefined index: 000000006553367d000000005133f603 in /Users/jacobspizziri/Documents/Projects/SRC3/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.
Notice: Undefined index: 000000006553367d000000005133f603 in /Users/jacobspizziri/Documents/Projects/SRC3/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php line 2873
当它尝试散列我在此处构建的组实体时会发生这种情况:
spl_object_hash($entity)
$entity看起来是这样的:
以下是我在实体中设置的关系:
/**
* @ORM\Entity
* @Gedmo\SoftDeleteable(fieldName="deletedAt")
*
* @author jacobspizziri
*/
class Group implements SoftDeletableInterface, TimestampableInterface {
/**
* @ORM\OneToMany(targetEntity="SRC\Bundle\UserBundle\Entity\User", mappedBy="group", cascade={"all"})
*/
protected $users;
}
/**
* @ORM\Entity
* @Gedmo\SoftDeleteable(fieldName="deletedAt")
*/
class User extends BaseUser implements SoftDeletableInterface, TimestampableInterface
{
/**
* @ORM\ManyToOne(targetEntity="SRC\Bundle\UserBundle\Entity\Group", inversedBy="users")
* @ORM\JoinColumn(name="group_id", referencedColumnName="id")
*/
protected $group;
}
我的bundle扩展了FOSUserBundle,但是我没有为我的组扩展FOSUserBundle\Entity\Group
这是怎么回事