On 13 November 2015 at 17:53, dunaeth <[email protected]> wrote: > I cannot set the extension properties through php mappings since > ClassMetadata is not intended to handle extensions. >
This is the bit that puzzles me: the metadata driver of Gedmo is completely independent, as you can see from https://github.com/Atlantic18/DoctrineExtensions/blob/eb01e2cf6492ecb2990d6d2ac996812835fd470d/lib/Gedmo/Mapping/Driver.php So basically it just takes some of the ORM metadata and generates new (separate) metadata for Gedmo only. So I suppose that there are only 2 ways to go left, change the whole > application mapping type or create a new ClassMetadata that could handle > the new properties (through new methods or properties) with a dedicated > driver that extend doctrine's metadata system. > That's actually what gedmo does - the gedmo metadata is just an array tho: https://github.com/Atlantic18/DoctrineExtensions/blob/eb01e2cf6492ecb2990d6d2ac996812835fd470d/lib/Gedmo/Mapping/ExtensionMetadataFactory.php#L69 What you can also do (in order to not complicate things) is implementing just the ExtensionMetadataFactory yourself (replace it?). > What I say may not be clear, unfortunately :/ > What seems to be unclear is that Doctrine\Common\Persistence\Mapping\ClassMetadata and Gedmo's mappings are completely different things, but have a similar/related lifecycle and are using the same mapping sources (XML/Annotations) via exploits, actually :-) 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.
