Description
The way how ClassMetadata
goes to cache seems to be inconsistent. The problem is affected in #12302
When some code adds to ClassMetadata
some constraints to ParentClass and then SubClass's ClassMetadata
is built the constraints will appear in that metadata and will have a chance to be cached. Then they could appear in SubClass's ClassMetadata
in other area of the code where ParentClass's ClassMetadata
doesn't have the additional runtime constraints.
And vice versa - ParentClass's ClassMetadata
runtime constraints won't affect SubClass's ClassMetadata
if it is cached already. Another case is when constraints added to ParentClass after SubClass is generated won't affect its metadata.
IMO this leads to cases that are hard to debug and hard to bypass. Could it be counted as issue? Are the acceptable ways to resolve the cases?