Hello,
I am new to CQRS and confused on how command will write a address change to a customer object
Lets say I have divided customer information into two tables
customer - Domain database
Active Preferred
Customer_Read database
Name,
Address,
Phone,
User modifies address of the customer. The address fields are all in read database. there may be 3 or more query friendly tables that is keeping address information.
If I understand the CQRS implementations (sample) Customer Domain (removed Aggregate root) should be publishing event about address change that should be handled by multiple handlers to update each of the table.
How do I implement this when I wont be changing the state of customer object? Do domain have to know that it has address in another database ?
Thank you in advance.
Regards,
The Mar
Update--
After going through more posts on net I am assuming that if the state is not changed by the command no event will be generated to save the domain itself but events will be applied to change the address in query / View Model friendly tables.