diff --git a/package-lock.json b/package-lock.json index b2388c0..0aae101 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "feathers-objection", - "version": "3.1.1", + "version": "3.1.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index caa7ca4..ecc48ee 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "feathers-objection", "description": "A service plugin for ObjectionJS an ORM based on KnexJS", - "version": "3.1.1", + "version": "3.1.2", "homepage": "https://github.com/feathersjs-ecosystem/feathers-objection", "keywords": [ "feathers", diff --git a/src/index.js b/src/index.js index eec4a98..e5ea85e 100644 --- a/src/index.js +++ b/src/index.js @@ -59,9 +59,9 @@ class Service extends AdapterService { const whitelist = Object.values(OPERATORS).concat(options.whitelist || []); super(Object.assign({ - id: 'id', + id: options.model.idColumn || 'id', whitelist - }, { id: options.model.idColumn, ...options })); + }, options)); this.idSeparator = options.idSeparator || ','; this.jsonSchema = options.model.jsonSchema;