0

I'm using a standard Symfony 2.8 framework with Doctrine. My entities' mappings are all annotated, but I would need to map a single entity by using the PHP way (by defining loadMetadata static method) . I know there's a way to override a mapping Bundle configuration like explained here, but what I would like is specifying a single Entity. Is that possible? Thanks

Community
  • 1
  • 1
Bertuz
  • 2,390
  • 3
  • 25
  • 50

1 Answers1

1

No you can't mix the formats

A bundle can accept only one metadata definition format. For example, it's not possible to mix YAML metadata definitions with annotated PHP entity class definitions.

see doc here: http://symfony.com/doc/current/doctrine.html

if you really need to change the mapping format then I suggest you create a new bundle for your specific entity. I also had this problem. I wished to have different mapping format (yml and annotation in my case) but I had to create a new bundle.

Mz1907
  • 625
  • 4
  • 10