Update deps

This commit is contained in:
Raymond Feng 2015-02-20 16:15:15 -08:00
parent 6988e1bdea
commit 2422c4c6f0
3 changed files with 13 additions and 9 deletions

View File

@ -324,6 +324,9 @@ MySQL.prototype.toDatabase = function (prop, val, forCreate) {
return this.client.escape(val);
}
if (prop.type === Number) {
if (isNaN(val)) {
val = null;
}
return this.client.escape(val);
}
if (prop.type === Date) {
@ -925,7 +928,7 @@ MySQL.prototype.propertiesSQL = function (model) {
if (pks.length === 1) {
var idName = this.idName(model);
var idProp = this._models[model].properties[idName];
if(idProp.generated) {
if (idProp.generated) {
sql.push(self.columnEscaped(model, idName) + ' INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY');
} else {
idProp.nullable = false;

View File

@ -8,15 +8,16 @@
},
"dependencies": {
"loopback-connector": "1.x",
"mysql": "~2.5.0",
"async": "~0.9.0",
"debug": "~2.0.0"
"mysql": "^2.5.4",
"async": "^0.9.0",
"debug": "^2.1.1"
},
"devDependencies": {
"loopback-datasource-juggler": "^2.15.0",
"should": "~1.3.0",
"mocha": "~1.20.1",
"rc": "~0.4.0"
"bluebird": "~2.9.10",
"loopback-datasource-juggler": "^2.17.0",
"mocha": "^2.1.0",
"rc": "^0.6.0",
"should": "^5.0.0"
},
"repository": {
"type": "git",

View File

@ -197,7 +197,7 @@ describe('mysql', function () {
posts.should.have.lengthOf(1);
post = posts[0];
post.should.have.property('title', 'b');
post.should.not.have.property('content');
post.should.have.property('content', undefined);
should.not.exist(post.id);
done();