Doctrine Index Undefined: String UnitOfWork.php 2873

I am using FOSUserBundle with Symfony2. I am trying to use the email registration confirmation feature. When I hit / confirm / {confirmToken}, the Doctrine url throws the following exception

Notice: Undefined index: 000000006553367d000000005133f603 in /Users/jacobspizziri/Documents/Projects/SRC3/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php line 2873

This happens when it tries to hash the Group object that I built here:

spl_object_hash($entity)

and $ entity is as follows:

sorry it looks so small

Here are the relationships that I have established in my entities:

/**
 * @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;
}

My package extends FOSUserBundle, however I do not extend FOSUserBundle \ Entity \ Group for my group

What's going on here?

+4
source share

Source: https://habr.com/ru/post/1547981/


All Articles