cormo
Advanced tools
Comparing version 1.2.2 to 1.2.3
@@ -284,3 +284,4 @@ "use strict"; | ||
model_class._collapseNestedNulls(instance, options.select_raw, null); | ||
const id = model_class.query_record_id_as_string ? String(this._getModelID(data)) : this._getModelID(data); | ||
const raw_id = this._getModelID(data); | ||
const id = raw_id && model_class.query_record_id_as_string ? String(raw_id) : raw_id; | ||
if (id) { | ||
@@ -293,3 +294,4 @@ instance.id = id; | ||
const model_class = this._connection.models[model_name]; | ||
const id = model_class.query_record_id_as_string ? String(this._getModelID(data)) : this._getModelID(data); | ||
const raw_id = this._getModelID(data); | ||
const id = raw_id && model_class.query_record_id_as_string ? String(raw_id) : raw_id; | ||
return new model_class(data, id, options.select, options.select_raw); | ||
@@ -296,0 +298,0 @@ } |
{ | ||
"name": "cormo", | ||
"description": "ORM framework for Node.js", | ||
"version": "1.2.2", | ||
"version": "1.2.3", | ||
"keywords": [ | ||
@@ -70,3 +70,3 @@ "orm", | ||
}, | ||
"gitHead": "beb8978584cfa12edb4c10210b8755401906d760" | ||
"gitHead": "241443c816ab43c1b1ff8f54aa8ad6ce2be5e7bf" | ||
} |
386077
10544