Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Can a discriminator field ever trigger a duplicate field mapping exception? #227
We have this method in
Based on how annotations are loaded, the discriminator annotations are processed at the class doc-block level and presumably before any field-level annotations. Therefore, I don't think any field mappings would exist at the time this method is called.
Perhaps it's more relevant for metadata defined in PHP, XML, and YAML?
The example in the annotations reference actually has a field mapping declared on the property corresponding to the discriminator field. That's the very thing I expect would trigger this exception, if the same example was ported to XML or YAML.