On 2/11/2016 1:31 PM, Ryan R. wrote:
> Seriously ?!
> 

Yes!

> Please read again how namespace aliasing works before adding comments
> that are wrong even in the simple php realm....
> 

Read the code given, as you explain ...

> Using
> use Doctrine\ORM\Mapping as ORM;
> means that any class in the namespace Doctrine\ORM\Mapping can now be
> called using @ORM\{class name or next namespace level}
> 

To access the "next namespace level" you would now need ORM\ORM\Entity
to access the Entity class of the Doctrine\ORM\Mapping\ORM namespace
because ORM is now an alias of namespace Doctrine\ORM\Mapping.

--
Earnie

> Le 11 févr. 2016 19:26, "Earnie" <[email protected]
> <mailto:[email protected]>> a écrit :
> 
>     On 2/11/2016 11:47 AM, Shadowalker wrote:
>     > After testign several combinations I found out that the issue
>     comes from
>     > the fact that use statement are not processed properly :
>     > |
>     >  use Doctrine\ORM\Mapping as ORM;
>     > |
>     >
>     > with
>     > |
>     > @ORM\Entity
>     > |
>     >
>     > does not work but
>     >
>     > |
>     >  use Doctrine\ORM\Mapping\ORM;
>     > |
>     >
>     > with
>     > |
>     > @Entity
>     > |
>     >
>     > does
>     >
> 
>     This is because your "as ORM" links the Doctrine\ORM\Mapping to ORM so
>     therefore ORM\Entity doesn't exist since ORM now points to
>     Doctrine\ORM\Mapping.  If you had not use "as ORM" the @ORM\Entity would
>     have worked.
> 
>     --
>     Earnie
> 
>     --
>     You received this message because you are subscribed to a topic in
>     the Google Groups "doctrine-user" group.
>     To unsubscribe from this topic, visit
>     https://groups.google.com/d/topic/doctrine-user/P2_MQUdPAPU/unsubscribe.
>     To unsubscribe from this group and all its topics, send an email to
>     [email protected]
>     <mailto:doctrine-user%[email protected]>.
>     To post to this group, send email to [email protected]
>     <mailto:[email protected]>.
>     Visit this group at https://groups.google.com/group/doctrine-user.
>     For more options, visit https://groups.google.com/d/optout.
> 
> -- 
> 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]
> <mailto:[email protected]>.
> To post to this group, send email to [email protected]
> <mailto:[email protected]>.
> Visit this group at https://groups.google.com/group/doctrine-user.
> For more options, visit https://groups.google.com/d/optout.

-- 
--
Earnie

-- 
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 https://groups.google.com/group/doctrine-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to