class User {

    /**
     * @var integer $userId
     * 
     * @ORM\Column(name="USER_ID", type="integer", nullable=false)
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="IDENTITY")
     */
    private $userId;

     /**
     * @ORM\OneToOne(targetEntity="Rangos\Entity\UserIdentity")
     * @ORM\JoinColumns({ 
     * @ORM\JoinColumn(name="userIdentity", 
referencedColumnName="USER_I_USER")
     * })
     */
    private $userIdentity;
}

class UserIdentity {

    /**
     * @var integer $userIId
     *
     * @ORM\Column(name="USER_I_ID", type="integer", nullable=false)
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="IDENTITY")
     */
    private $userIId;
   
    
     /**
     * @var \USUARIOS
     * @ORM\GeneratedValue
     * @ORM\OneToOne(targetEntity="Rangos\Entity\User", 
inversedBy="USER_ID")
     * @ORM\JoinColumns({ 
     * @ORM\JoinColumn(name="USER_I_USER", referencedColumnName="USER_ID")
     * })
     */
    private $userIUser;

}

PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 
't0.userIdentity' in 'field list'

Em quarta-feira, 26 de fevereiro de 2014 18h08min07s UTC-3, Marco Pivetta 
escreveu:
>
>
>
> On 26 February 2014 21:53, João Carlos Santa Ana 
> <[email protected]<javascript:>
> > wrote:
>
>> I do not believe to be 4 days to solve this :/. 
>> keep getting an exception:
>>
>> AnnotationException: [Semantical Error] The annotation "@OneToOne" in 
>> property Rangos\Entity\User::$userIdentity was never imported. Did you 
>> maybe forget to add a "use" statement for this annotation? 
>>
>>
> You need to prefix the annotation with "ORM\", so it should be 
> "@ORM\OneToOne"
>
> Read your exception messages carefully ;-)
>
> Marco Pivetta 
>
> http://twitter.com/Ocramius      
>
> http://ocramius.github.com/ 
>  

-- 
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/groups/opt_out.

Reply via email to