waterline
Advanced tools
Comparing version 0.5.2 to 0.6.0
@@ -37,2 +37,21 @@ ////////////////////////////////////////////////////////////////////// | ||
// Validate and marshal attribute defs | ||
if (definition.attributes) { | ||
definition.attributes = util.objMap(definition.attributes, function (attr, attrName) { | ||
var type; | ||
if (_.isString(attr)) attr = { | ||
type: attr | ||
}; | ||
else if (!_.isArray(attr) && _.isObject(attr)) {} | ||
else { | ||
"Invalid attribute '"+attrName+"' in model ("+definition.identity+")."; | ||
} | ||
// Lowercase attr type | ||
attr.type = attr.type.toLowerCase(); | ||
return attr; | ||
}); | ||
} | ||
////////////////////////////////////////// | ||
@@ -39,0 +58,0 @@ // DDL |
{ | ||
"name": "waterline", | ||
"version": "0.5.2", | ||
"version": "0.6.0", | ||
"description": "Active Record for Node.js", | ||
@@ -5,0 +5,0 @@ "main": "waterline.js", |
130819
3332