1602/jugglingdb — pull request #95 by dombesz (2012-06-19 10:22:48+00:00)
Title: Bug on initializing models with empty number property on postgresql.

When I have the following scheme:

var Post = db.schema.define('Post', {
title: String,
user_id: Number
});

And initializing an object like this:

var post = new Post.create({title:'Hello', user_id:''});

It produces the following sql:

INSERT INTO "Post" ("title", "user_id") VALUES ('Hello',) RETURNING id;

Note, that the `user_id` is not set to `NULL` and also the code contains syntax error.

Provided a patch to address the issue.