Help, strange errors, I do not see the problem.

class User {

    /**
     *
     * @var integer $id
     * @ORM\Column(name="id", type="integer", nullable=false)
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="IDENTITY")
     */
    private $id;
        
    /**
     * 
     * @ORM\OneToOne(targetEntity="Address")
     * @ORM\JoinColumns({
     * @ORM\JoinColumn(name="id", referencedColumnName="user")
     * })
     */
    private $userAddress;
.......


#---------------------------------------------------------------#

class Address {

    /**
     * @ORM\Column(name="address_id", type="integer", nullable=false)
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="IDENTITY")
     */
    private $addressId;
    
    /**
     * 
     * @var \User 
     * @ORM\Column(name="user", nullable=false)
     * @ORM\OneToOne(targetEntity="Application\Entity\User" , 
inversedBy="userAddresse")
     * @ORM\JoinColumns({
     * @ORM\JoinColumn(name="user", referencedColumnName="id")
     * })
     */
    private $user;
.........

#---------------------------------------------------------------#

Notice: Undefined index: addressId in 
C:\RDM\rede-market-1\Rede-Market-0\vendor\doctrine\common\lib\Doctrine\Common\Proxy\AbstractProxyFactory.php
 
on line 
*121*

*Other error*

 public function insert(array $data) {

        $entity = new $this->entity($data);
        $data['user'] = $entity;
        $address = new $this->entityAddress($data);


#####################


/**
 * 
 * @ORM\Table(name="Address")
 * @ORM\Entity
 * @ORM\Entity(repositoryClass="Application\Entity\AddressRepository")
 */
class Address {

........
    public function setUser(\Application\Entity\User $user) {
        $this->user = $user;
    }
....

 Catchable fatal error: Object of class Application\Entity\User could not 
be converted to string in 
C:\RDM\rede-market-1\Rede-Market-0\vendor\doctrine\dbal\lib\Doctrine\DBAL\Statement.php
 
on line *120*




help :((


-- 
You received this message because you are subscribed to the Google Groups 
"doctrine-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/doctrine-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to