Hi,

On 22 September 2014 13:26, Maarten van Leeuwen <[email protected]>
wrote:

> Almost every example about traits I come across uses annotations for
> mapping, and I need mapping in XML. I cannot find support for this in the
> mapping .xsd.  can traits have their own XML mapping documents (similar to
> a mapped superclass) or do I have to specify the trait mappings on every
> Entity using the trait?
>

A trait is not an existing thing, it's just copy-paste code that can be
reused in different classes.

Therefore, there cannot be a concept such as "mapping a trait", since the
trait doesn't represent anything unless used inside a concrete
implementation.

Yes, you will need to map the trait properties in entity mappings.

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/d/optout.

Reply via email to