diff --git a/lib/entity/entity.config.ts b/lib/entity/entity.config.ts index 93e1d26..885bca6 100644 --- a/lib/entity/entity.config.ts +++ b/lib/entity/entity.config.ts @@ -14,6 +14,8 @@ export class ModelEntity extends EntityConfigBase{ super(config, entityConstructor); this.loadAll = config.loadAll === true; + if (!this.endpoint && !this.values) + throw new Error(`Can't create entity ${this.entityConstructor.name}, no endpoint or values defined.`); } } diff --git a/package.json b/package.json index e72fc70..2df8b6f 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "systemjs": ">=0.20.12", "typescript": "^2.4.2", "zone.js": ">=0.8.7", - "run-sequence": "^2.2.0" + "run-sequence": "^2.2.0" }, "peerDependencies": { "rxjs": ">=5.2.0",