Closed pawarvijay closed 8 years ago
to see if actually it works i changed
return vB.name === query.name && (vB.version === query.version || vB.version === -1) && (vB.aggregate === query.aggregate) && (vB.context === query.context);
to this
return vB.name === query.name
Note : this change is bad for context , but just for ( testing purpose/see whether it creates read model) i tried this
this creates a readmodel successfully
:) sorry i missed some configurations
in viewbuilder for context here
aggregate: 'salesinvoice',
context: 'sales',
I had setup my repository for context implementation according to my previous #16
Steps that i followed to implement context: 1 : Used configuration like,
context: 'context.name', aggregate: 'aggregate.name'
indomain.defineCommand ({ , domain.defineEvent({ , eventDenormalizer.defineEvent({
2 : structured directory for context manufacturing and aggregate item 3 : addedcontext.js
according to manufacturing context 4 : addedcontext: { name: 'mycontext' }
in commandOn testing i found readmodel was not generating
On Further debugging i found some mismatch here
Due to context setup :
query.aggregate = 'narration' & query.context = 'mycontext'
but on other side in_.filter(this.viewBuilders
,it containsaggregate= null & context = null
in all objects in array so nothing matches and it returns empty array