sequelize/sequelize — pull request #2372 by vpontis (2014-10-01 01:33:31+00:00)
Title: single linked has many broken when specifying field

This breaks because it doesn't user `identiferField` when constructing the `WHERE` query.

It gets:

```shell
1) [POSTGRES] HasMany (N:M) foreign key with fields specified should correctly get associations when singly linked:
SequelizeDatabaseError: error: column Puppy.userId does not exist
at module.exports.Query.formatError (/Users/vpontis/temp/sequelize/lib/dialects/postgres/query.js:265:16)
at null. (/Users/vpontis/temp/sequelize/lib/dialects/postgres/query.js:63:21)
at emit (events.js:95:17)
at Query.handleError (/Users/vpontis/temp/sequelize/node_modules/pg/lib/query.js:101:8)
at null. (/Users/vpontis/temp/sequelize/node_modules/pg/lib/client.js:167:26)
at emit (events.js:95:17)
at Socket. (/Users/vpontis/temp/sequelize/node_modules/pg/lib/connection.js:109:12)
at Socket.emit (events.js:95:17)
at Socket. (_stream_readable.js:764:14)
at Socket.emit (events.js:92:17)
at emitReadable_ (_stream_readable.js:426:10)
at emitReadable (_stream_readable.js:422:5)
at readableAddChunk (_stream_readable.js:165:9)
at Socket.Readable.push (_stream_readable.js:127:10)
at TCP.onread (net.js:528:21)
```

when running the query:

```
SELECT "id", "breed", "createdAt", "updatedAt", "user_id" AS "userId" FROM "Puppies" AS "Puppy" WHERE ("Puppy"."userId" = 1 AND 1=1 AND "Puppy"."id"=1);
```