bulkCreate would have problems with a disparate field list. Closes #736#738
bulkCreate would have problems with a disparate field list. Closes #736#738sdepold merged 3 commits intosequelize:masterfrom
Conversation
|
I believe the tests in hasMany associations should be changed to (2,1) from (1,2)... please check travis logs to see what I'm talking about. This might be a false flag in the current test suite :) |
|
I believe it was changed in a recent PR. Will try to figure it whats correct :D |
|
I would say that INSERT INTO `TasksUsers` (`TaskId`,`UserId`) VALUES (1,1),(2,1)is correct. We create one user and assigns two tasks. The userid is the same, but taskid is different Actually, to make this test completely valid we should also check the correct order of the columns (i.e. also assert that the order is TaskId, UserId and not the other way around). The problem then becomes that we have to take into account different qouting methods. Perhaps we could assert that indexof taskid < indexof userid? |
|
@sdepold (or @mickhansen or anyone else for that matter) you mind voicing your opinion on this issue? Only reason why I'm pinging is because this PR would be changing a test case. Just want to make sure @janmeier and myself aren't crazy ;) |
|
@janmeier updated :) |
|
looks good. also |
bulkCreate would have problems with a disparate field list. Closes #736
I'm not sure if this affects performance much, probably a little bit especially with a lot of rows... but there are much bigger things to blame for performance issues than this PR. Sequelize needs a little bit of remodeling pretty soon ;)