Wrong Spring repository bean name when using aggregate polymorphism #2514
Labels
Priority 1: Must
Highest priority. A release cannot be made if this issue isn’t resolved.
Status: Resolved
Use to signal that work on this issue is done.
Type: Bug
Use to signal issues that describe a bug within the system.
Milestone
Basic information
Steps to reproduce
When using aggregate polymorphism, i.e. base aggregate class A (abstract) and subtypes B and C, Axon provides no Axon repository bean named in
aRepository
, which is the common super-type. This used to work in Axon 4.6.1. The repository is still created, but there is no control over the bean name. It seems to pick the bean name from the first sub-type in alphabetical order.Expected behaviour
Axon should provide a bean name based on the super-type, as in Axon 4.6.1, not based on alphabetical order of sub-types to support proper auto wiring.
Actual behaviour
The repository is available in the Spring context with the "wrong" name. Still it is able to resolve/load types based on the super type, i.e. including the whole hierarchy. As such, it seems the bean name used for registering the correct repository is simply wrong.
The text was updated successfully, but these errors were encountered: