waterline
Advanced tools
Comparing version 0.9.12 to 0.9.13
@@ -74,2 +74,11 @@ /** | ||
// Grab information about the adapters | ||
var adapterInfo = AdapterLoader(this.adapter, options.adapters); | ||
// Check if the adapter overrides the autoPK setting | ||
var autoPK = Object.getPrototypeOf(this).hasOwnProperty('autoPK'); | ||
if(adapterInfo.adapter.defaults && adapterInfo.adapter.defaults.hasOwnProperty('autoPK')) { | ||
if(!autoPK) this.autoPK = adapterInfo.adapter.defaults.autoPK; | ||
} | ||
// Initialize internal objects from attributes | ||
@@ -89,11 +98,2 @@ this._schema.initialize(this.attributes, this.hasSchema); | ||
// Grab information about the adapters | ||
var adapterInfo = AdapterLoader(this.adapter, options.adapters); | ||
// Check if the adapter overrides the autoPK setting | ||
var autoPK = Object.getPrototypeOf(this).hasOwnProperty('autoPK'); | ||
if(adapterInfo.adapter.defaults && adapterInfo.adapter.defaults.hasOwnProperty('autoPK')) { | ||
if(!autoPK) this.autoPK = adapterInfo.adapter.defaults.autoPK; | ||
} | ||
// Normalize Adapter Definition with actual methods | ||
@@ -100,0 +100,0 @@ this.adapter = adapterInfo.adapter; |
{ | ||
"name": "waterline", | ||
"description": "An ORM for Node.js and the Sails framework", | ||
"version": "0.9.12", | ||
"version": "0.9.13", | ||
"contributors": [ | ||
@@ -6,0 +6,0 @@ { |