Hi Gonzalo, For reference, use http://www.doctrine-project.org/jira/browse/DDC-3391 (that's also where, IMO, discussion should happen)
I'm wondering what the use-case is. In general, metadata is meant to be a well-formed data structure, not containing mixed information. Other software simply uses its own `ClassMetadataFactory` to retrieve use-case-specific metadata that is NOT the one of the ORM. Greets, Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 14 November 2014 11:32, Gonzalo Vilaseca <[email protected]> wrote: > I've opened an issue in Jira but would like to hear some users opinion: > > What I'd like to propose is a way of easily extending the metadata > information by defining custom tags in mapping files and then add them to > Metadata class. > > So the current problem is this: I want to add custom tags to doctrine > metadata files, and then get this tags on a loadClassMetadata listener in > order to modify the mapping. > Currently the only workaround is parsing this custom tags in the > loadClassMetadata listener, going through all the files again. > > I was thinking of having a new 'extraMetadata' array field in > ClassMetadata, every time a driver parses a configuration, throw a new > event with the read configuration (being xml, yaml...etc.). A custom > listener will parse it according to the new custom tags and return an array > that will beappended to the 'extraMetadata' array field in ClassMetadata. > > Then, on the loadClassMetadata listener we retrieve this 'extraMetadata' > configuration information array, and modify the mapping as we want. > > Does this make sense? > > -- > 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. > -- 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.
