AxonFramework/AxonFramework — Issue #22: Enhance Domain Model: allow any Object as AggregateIdentifier
Author: abuijze
Created: 2011-12-03 14:54:41+00:00
State: open
Labels: Enhancement

**What are the limitations you encounter in the current version? Please provide a simple use-case.**
The application's domain model is "polluted" with Axon specific classes and interfaces. While most of these classes have limited scope (like the aggregates), some have a more public function.
The identifiers of aggregates are an example of such objects. They currently need to implement an Axon-specific interface, which makes them less re-usable on systems that don't need Axon.

**Please describe the enhancement you would like to have.**
Instead of relying on the AggregateIdentifier interface, Axon should accept any Object as aggregate identifier. When components rely on a String (e.g. JpaEventStore) for lookup purposes, a converter should be used to convert the Object to a String (a default converter will accept Number and String instances, and will call toString() on other objects).