Hi Florian,

If the class in the Core bundle doesn't (and shouldn't) contain any mapping 
metadata, extending that class in the Web bundle and mapping it as a regular 
Entity should be fine.

Where's the mapping file located? If I'm not mistaken Symfony2 likes to have it 
at:
    src/Acme/WebBundle/Resources/config/doctrine/Doc.orm.yml

The message "Class Acme\CoreBundle\Entity\Doc is not a valid entity or mapped 
super class" sounds like Doctrine isn't finding any mapping metadata for that 
class.

And when the extend in the Web bundle (Acme\WebBundle\Entity\Doc) is the only 
one that needs mapping metadata, you won't need anything in (or mentioning) the 
Core bundle.

--  
Jasper N. Brouwer
(@jaspernbrouwer)


On 1 September 2014 at 21:03:35, Florian Peschka ([email protected]) 
wrote:
> Hello Marco,
>  
> thanks for your fast response, but I think mapped super class must be
> added to the core bundle right, regarding doctrine documentation?
> In general I don't want to change the core bundle to add there a entity
> mapping containing type mapped super class.
>  
> CoreBundle contains the classes (no abstract, no mapping files if possible)
> WebBundle contains an inheriated class and mapping files
>  
> Creating in Web Bundle another file called Acme.Core.Doc.orm.yml as mapped
> super class and create another file Doc.org.yml or full qualified using the
> inherited class results into
>  
> [Doctrine\Common\Persistence\Mapping\MappingException]
> Class Acme\Web\Entity\Acme\Core\Entity\Doc' does not exist
>  
> I just want to have the doctrine mapping files in web bundle and extend the
> base class delivered by the core bundle


-- 
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