cqrs-eventdenormalizer
Advanced tools
Comparing version 1.2.0 to 1.2.1
@@ -65,2 +65,26 @@ 'use strict'; | ||
/** | ||
* Returns the concatenated id (more unique) | ||
* @param {Object} evt The passed eventt. | ||
* @returns {string} | ||
*/ | ||
getConcatenatedId: function (evt) { | ||
var aggregateId = ''; | ||
if (dotty.exists(evt, this.definition.aggregateId)) { | ||
aggregateId = dotty.get(evt, this.definition.aggregateId); | ||
} | ||
var aggregate = ''; | ||
if (dotty.exists(evt, this.definition.aggregate)) { | ||
aggregate = dotty.get(evt, this.definition.aggregate); | ||
} | ||
var context = ''; | ||
if (dotty.exists(evt, this.definition.context)) { | ||
context = dotty.get(evt, this.definition.context); | ||
} | ||
return context + aggregate + aggregateId; | ||
}, | ||
/** | ||
* Updates the revision in the store. | ||
@@ -120,4 +144,4 @@ * @param {Object} revisionMap The revision map. | ||
if (!!self.definition.revision && dotty.exists(evt, self.definition.revision) && | ||
!!self.definition.aggregateId && dotty.exists(evt, self.definition.aggregateId)) { | ||
var aggId = dotty.get(evt, self.definition.aggregateId); | ||
!!self.definition.aggregateId && dotty.exists(evt, self.definition.aggregateId)) { | ||
var aggId = self.getConcatenatedId(evt); | ||
revisionMap[aggId] = dotty.get(evt, self.definition.revision); | ||
@@ -124,0 +148,0 @@ } |
{ | ||
"author": "adrai", | ||
"name": "cqrs-eventdenormalizer", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"private": false, | ||
@@ -6,0 +6,0 @@ "main": "index.js", |
@@ -0,1 +1,4 @@ | ||
## [v1.2.1](https://github.com/adrai/node-cqrs-eventdenormalizer/compare/v1.2.0...v1.2.1) | ||
- fix revisionGuard in replay | ||
## [v1.2.0](https://github.com/adrai/node-cqrs-eventdenormalizer/compare/v1.1.11...v1.2.0) | ||
@@ -2,0 +5,0 @@ - added getInfo function |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
193992
3200