Comparing version 2.15.2 to 2.15.3
@@ -187,9 +187,11 @@ /* UNIQORM | ||
if (this.fields[name]) | ||
throw new ArgumentError('Field "%s" already exists', name); | ||
throw new ArgumentError('Field "%s.%s" already exists', this.name, name); | ||
if (def.foreignModel) { | ||
if (def.dataType) | ||
throw new ArgumentError('Invalid field definition for "%s". You can\'t define "dataType" for associated fields', name); | ||
throw new ArgumentError('Invalid field definition for "%s.%s". You can\'t define "dataType" for associated fields', | ||
this.name, name); | ||
if (def.calculate) | ||
throw new ArgumentError('Invalid field definition for "%s". You can\'t define "calculate" method for associated fields', name); | ||
throw new ArgumentError('Invalid field definition for "%s.%s". You can\'t define "calculate" method for associated fields', | ||
this.name, name); | ||
return (this.fields[name] = new AssociatedField(name, this, def)); | ||
@@ -200,3 +202,4 @@ } | ||
if (def.dataType) | ||
throw new ArgumentError('Invalid field definition for "%s". You can\'t define "dataType" for calculated fields', name); | ||
throw new ArgumentError('Invalid field definition for "%s.%s". You can\'t define "dataType" for calculated fields', | ||
this.name, name); | ||
return (this.fields[name] = new CalculatedField(name, this, def)); | ||
@@ -206,3 +209,4 @@ } | ||
if (!def.dataType) | ||
throw new ArgumentError('You must provide "dataType" property'); | ||
throw new ArgumentError('Invalid field definition for "%s.%s". You must provide "dataType" property', | ||
this.name, name); | ||
@@ -209,0 +213,0 @@ const Ctor = DataField.get(def.dataType); |
{ | ||
"name": "uniqorm", | ||
"description": "Multi dialect and multi schema ORM framework for enterprise level NodeJS applications", | ||
"version": "2.15.2", | ||
"version": "2.15.3", | ||
"author": "Panates Ltd.", | ||
@@ -35,7 +35,7 @@ "contributors": [ | ||
"babel-eslint": "^10.0.1", | ||
"eslint": "^5.15.3", | ||
"eslint": "^5.16.0", | ||
"eslint-config-google": "^0.12.0", | ||
"fecha": "^3.0.2", | ||
"glob": "^7.1.3", | ||
"mocha": "^6.0.2", | ||
"mocha": "^6.1.2", | ||
"nyc": "^13.3.0", | ||
@@ -42,0 +42,0 @@ "rejected-or-not": "^1.0.1", |
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
98222
3224