You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I ran into an issue past week and couldn't figure out what I was doing wrong. At the company I work at, we've created some bundles for reuse. We use interfaces in the association mapping, so we can extend entities and have the associations within the bundle to be remapped with the concrete classes.
I made the mistake to assume that the ResolveTargetEntityListener would also remap the discriminatorMap for STI/JTI entities. It seemed so evident to me that this would also work. I realise the name of the listener itself says ResolveTargetEntityListener and so it would only resolve the targetEntity properties of the association mappings. I find resolving target entities such a powerful feature, for extensibility in vendor libraries/bundles, that it's a shame I am forced to extend the STI/JTI entity whenever I extend an entity from the discriminatorMap,, because I need to change the discriminatorMap with the new concrete class.
Q
A
New Feature
yes
RFC
yes/no
BC Break
yes/no
Summary
I suggest either creating a new listener, ResolveDiscriminatorMapListener or renaming the current listener to something else and add the feature to remap the discriminatorMap.
I wonder what your thoughts are. I'm happy to do this myself and open up a PR if there's interest in such feature.
The text was updated successfully, but these errors were encountered:
Feature Request
I ran into an issue past week and couldn't figure out what I was doing wrong. At the company I work at, we've created some bundles for reuse. We use interfaces in the association mapping, so we can extend entities and have the associations within the bundle to be remapped with the concrete classes.
I made the mistake to assume that the ResolveTargetEntityListener would also remap the discriminatorMap for STI/JTI entities. It seemed so evident to me that this would also work. I realise the name of the listener itself says ResolveTargetEntityListener and so it would only resolve the targetEntity properties of the association mappings. I find resolving target entities such a powerful feature, for extensibility in vendor libraries/bundles, that it's a shame I am forced to extend the STI/JTI entity whenever I extend an entity from the discriminatorMap,, because I need to change the discriminatorMap with the new concrete class.
Summary
I suggest either creating a new listener, ResolveDiscriminatorMapListener or renaming the current listener to something else and add the feature to remap the discriminatorMap.
I wonder what your thoughts are. I'm happy to do this myself and open up a PR if there's interest in such feature.
The text was updated successfully, but these errors were encountered: