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

Am Montag, 1. September 2014 18:06:07 UTC+2 schrieb Marco Pivetta:
>
> Map it as MappedSuperClass, that should do the trick.
>
> Marco Pivetta 
>
> http://twitter.com/Ocramius      
>
> http://ocramius.github.com/
>
>
> On 1 September 2014 17:48, Florian Peschka <[email protected] 
> <javascript:>> wrote:
>
>> I have a simple class which acts as entity in an own bundle (core) and 
>> want to use that class as doctrine entity. The bundle doesn't contain any 
>> information about mapping of that class or similar.
>>
>> I need to extend that class, because another constructor logic is needed. 
>> This is done in the bundle web. I have created a mapping for the bundle 
>> containing the extended class, the mapping file is called **Doc.orm.yml**.
>>
>>     Acme\WebBundle\Entity\Doc:
>>       type: entity
>>       table: docs
>>       id:
>>         id:
>>           type: integer
>>           generator:
>>              strategy: AUTO
>>       
>>       fields:
>>         ...
>>
>> Running the app results into
>>
>> > Class "Acme\CoreBundle\Entity\Doc" is not a valid entity or mapped 
>> super class.
>>
>> The mentioned class is the unmapped class from the core bundle.
>>
>> How can I extend an unmapped class and use it with doctrine?
>>
>> Thanks for any hints.
>>  
>> -- 
>> 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] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> Visit this group at http://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].
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