Vaughn Vernon says that aggregate should only hold references to other aggregates if they need to communicate. I understand that if you want an aggregate to do something you let that aggregate consume an event from the source aggregate. In the case where you want a response from the other aggregate, how will you do it in axon.
If you have a business rule that has to be respected, and on executing the command, the rule is violated, how do you communicate to the query side that something went wrong.
Looking at the axon trader example, the commandhandlers return a value, DDD says commands shouldn’t return values. Is it just for initializing the database or could that be used in requesting information from aggregate.
Still in the Axon-Trader application I see Model being used a lot in controllers. I don’t know about the Model class, but it looks like kind of a session variable.
ii. Could it be used like a session to store application information?
In modelling, I understand that the database tables are just views for display convenience.Are database tables
then required to be linked then with foreign keys?
Thanks and sorry for the long essay.