sequelize/sequelize — pull request #1211 by maximeCony (2014-01-06 22:58:07+00:00)
Title: For the paranoidClause function, prevent that deletedAt is overwritten w...

...hen the where option is an array

```
db.Guide.find({
where: [
'UPPER("user"."slug") = UPPER(?) ' +
'AND "user"."deleted_at" IS NULL ' +
'AND "guides"."deleted_at" IS NULL ' +
req.params.userSlug,
],
include: [
{ model: db.User, as: 'user' },
],
}).success(function(guide) {
```
This snippet fails with this error :
error: column reference "deleted_at" is ambiguous

because paranoidClause adds at the end of the query:
```
AND "deleted_at" IS NULL
```

This pull request first verifies if a deleteAt has been specified when "where" is an array and prevents to overwrite it.
Secondly it adds the tableName to the WHERE clause to prevent this error: "column reference "deleted_at" is ambiguous".