diff --git a/lib/introspect/transactiondeclaration.js b/lib/introspect/transactiondeclaration.js index 9e117a81da..08aeb10ae0 100644 --- a/lib/introspect/transactiondeclaration.js +++ b/lib/introspect/transactiondeclaration.js @@ -67,10 +67,6 @@ class TransactionDeclaration extends ClassDeclaration { systemTypeDeclared = hasSystemType; } - if (!this.isSystemType() && this.idField && systemTypeDeclared) { - throw new IllegalModelException('Transaction should not specify an identifying field.', this.modelFile, this.ast.location); - } - // perform general validation after specific validation. super.validate(); } diff --git a/package-lock.json b/package-lock.json index a933fadb1b..f0fbd65f9e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "composer-concerto", - "version": "0.31.2", + "version": "0.31.3", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 5b1d6bdc81..7ab6947d4e 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "composer-concerto", - "version": "0.31.2", - "description": "Hyperledger Composer Concerto", + "version": "0.40.0", + "description": "Concerto", "engines": { "node": ">=8", "npm": ">=5" diff --git a/test/introspect/transactiondeclaration.js b/test/introspect/transactiondeclaration.js index 4d2edb3347..7dc1800eac 100644 --- a/test/introspect/transactiondeclaration.js +++ b/test/introspect/transactiondeclaration.js @@ -59,21 +59,5 @@ describe('TransactionDeclaration', () => { td.validate(); }); - - it('should cover the other error paths', () => { - const model = ` - namespace org.acme - transaction T identified by id{ - o String id - } - `; - - const modelFile = new ModelFile(modelManager, model); - let td = modelFile.getTransactionDeclaration('T'); - - (() => { - td.validate(); - }).should.throw(/Transaction should not specify an identifying field./); - }); }); });