thenativeweb / node-cqrs-domain

Node-cqrs-domain is a node.js module based on nodeEventStore that. It can be very useful as domain component if you work with (d)ddd, cqrs, eventdenormalizer, host, etc.
http://cqrs.js.org/pages/domain.html
MIT License
269 stars 57 forks source link

Schema validation rules structure loader bug fix #127

Closed OrH closed 6 years ago

OrH commented 6 years ago

When using json schema validation for commands with the default structure loader and multiple aggregates, if one of the aggregate names is actually a part of another aggregate name - for example "item" and "itemGroup", the foundAggr would return true on "item" for both of them which results in missing validations.

The fix is the same as other checks in the structureLoader.js file.