不要怂,就是干,撸起袖子干!

You need to sign in or sign up before continuing.
Commit aca6d5b8 by Sascha Depold

fixed conditions for postgresql

1 parent 281a5871
Showing with 7 additions and 4 deletions
......@@ -569,11 +569,14 @@ describe("[" + dialect.toUpperCase() + "] DAOFactory", function() {
this.User.create({ name: 'barfooz' }).success(function(user1) {
this.User.create({ name: 'barfooz' }).success(function(user2) {
this.Task.create({ title: 'task' }).success(function(task) {
var where = [Sequelize.Utils.addTicks(this.User.tableName) + ".`id`=?", user1.id]
if (dialect === 'postgres') {
where = ['"' + this.User.tableName + '"."id"=?', user1.id]
}
this.User.findAll({
where: [
Sequelize.Utils.addTicks(this.User.tableName) + ".`id`=?",
user1.id
],
where: where,
include: [ 'Task' ]
}).success(function(users){
expect(users.length).toEqual(1)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!