thenativeweb / node-cqrs-eventdenormalizer

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

viewbuilder for multiple events #24

Closed TomKaltz closed 9 years ago

TomKaltz commented 9 years ago
ed.defineViewBuilder({
    name: '', // optional, default is file name without extension, if name is '' it will handle all events that matches
    aggregate: 'timesheet', // optional
    context: 'timesheet',
    id: 'aggregateId', // if not defined or not found it will generate a new viewmodel with new id
    //payload: 'payload' // optional,
    //if not defined it will pass the whole event...
    autoCreate: true

    // optional, if not defined it will pass the whole event...
    //payload: 'payload'
  },...

I have tried this but the denormalizer wouldn't fire for all aggregates named timesheet. Did I misinterpret "it will handle all events that matches"?

adrai commented 9 years ago

No, viewBuilders are dedicated to a specific event...

TomKaltz commented 9 years ago

What is...

name: '', // optional, default is file name without extension, if name is '' it will handle all events that matches

adrai commented 9 years ago

I think this is a mistake... only eventExtenders can do such things...

adrai commented 9 years ago

But this could be the next feature ;-)

adrai commented 9 years ago

It's ok for you if I do this tomorrow?

TomKaltz commented 9 years ago

You can do it whenever you want. I make no demands for open source software. Thanks for your contribution to the community!

On Mon, Jul 27, 2015 at 4:11 PM, Adriano Raiano notifications@github.com wrote:

It's ok for you if I do this tomorrow?

— Reply to this email directly or view it on GitHub https://github.com/adrai/node-cqrs-eventdenormalizer/issues/24#issuecomment-125328902 .

adrai commented 9 years ago

v1.8.4