sequelize/sequelize — pull request #2222 by janmeier (2014-09-01 11:45:24+00:00)
Title: Fix object syntax for hasmany and belongsto foreign keys

Closes #2164. I've also changed so that existing attributes are properly merged with new ones. So for example if you already have an attribute `userId` in your model with allowNull set to false, and you do `User.hasMany(Model)`, we will add the proper references and constraints to the `userId` column, and keep the `allowNull` constraint