Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extending entities dont have the matching metadata #5

Open
pscheit opened this issue Nov 8, 2013 · 1 comment
Open

Extending entities dont have the matching metadata #5

pscheit opened this issue Nov 8, 2013 · 1 comment

Comments

@pscheit
Copy link
Member

pscheit commented Nov 8, 2013

When extending author from user, no STI or CTI strategy is chosen automatically. The doctrine metadata is therefore not correct

@pscheit
Copy link
Member Author

pscheit commented Mar 11, 2014

  • make the CTI entity abstract because otherwise we'll get: [Doctrine\ORM\Mapping\MappingException] Entity 'BaseEntity' has to be part of the discriminator map of 'BaseEntity' to be properly mapped in the inheritance hierarchy. Alter natively you can make 'BaseEntity' an abstract class to avoid this exception from occurring.
  • add the discriminator map to the BaseEntity and fill it with all extending classes: note: this is tricky because we'll have to hack into "userland" here. Maybe we should find another way to provide this user data

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant