Hi Holtkamp, have you ever found a solution for this problem? I'm having 
the same issue...

El domingo, 5 de enero de 2014, 13:16:35 (UTC-3), Holtkamp escribió:
>
> To improve possible reuse of Domain Entities and inspired by this article (
> http://docs.doctrine-project.org/en/latest/cookbook/resolve-target-entity-listener.html),
>  
> I am currently looking at separating mapping information from my Entities, 
> by using XML-mapping files instead of in-line annotations.
>
> To prevent coding the XML-mapping by hand, I used: 
> php doctrine.php orm:convert-mapping --force xml xml/orm-mapping
>
> This worked quite nice and resulted in an XML-mapping file for each 
> Entity. However, it seems that inherited Entity properties are also defined 
> twice. 
>
> class A{
>     /**
>      * @ORM\Column
>      */
>     protected $a;
> }
> class B extends A{
>     /**
>      * @ORM\Column
>      */
>     protected $b;
> }
>
> Results in two files:
> <doctrine-mapping>
>   <entity name="A">
>     <field name="a" type="string" column="a" />
>   </entity>
> </doctrine-mapping
>
> <doctrine-mapping>
>   <entity name="B">
>     <field name="a" type="string" column="a" />
>     <field name="b" type="string" column="b" />
>   </entity>
> </doctrine-mapping
>
>
>    - Using a MappedSuperclass (which would mark the property / 
>    association as 'inherited' in the Metadata) is not an option, since the 
>    inheritance hierarchy is quite large.
>    - Manually removing of the duplicate properties is an option, but not 
>    preferred ;)
>
>
> My question: is there way to prevent 'inherited' fields from being 
> included when generating the XML-mapping from the annotations?
>
> Cheers
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/doctrine-user/e70afb35-3c6b-446f-8742-5a2cbd3aa067%40googlegroups.com.

Reply via email to