Repository navigation
Fix findAndCountAll issues - #5534
Conversation
|
@mickhansen @janmeier Please have a look on this one when you get chance |
| @@ -1,4 +1,7 @@ | |||
| # Future | |||
| - [Fixed] `findAndCountAll` generates wrong SQL query [#5445](https://github.com/sequelize/sequelize/issues/5445) | |||
| - [Fixed] `count` methods pollute the options.includes [#4191](https://github.com/sequelize/sequelize/issues/4191) | |||
There was a problem hiding this comment.
I don't see a change for this, have you just verified that it does indeed work?
There was a problem hiding this comment.
There was a problem hiding this comment.
Right, more tests are awesome! Just wanted to check if it was already broken, and doesn't seem like it was
There was a problem hiding this comment.
Yes it want broken because someone fixed .findAll method, But still there was no test. So its a verification only, it was already fixed
|
@mickhansen I have prefixed the condition, Can you somehow start the CI build, My local test run was ok. |
|
No CI active for this PR, very odd. |
|
Yeah Travis didn't started any CI because last commit had |
|
@mickhansen current CI has stuck, Can you please restart |
|
Please re-open and i'll make sure it gets a thorough review. |
|
Still no CI, very odd, no idea how to fix. |
| }); | ||
| }); | ||
| }); | ||
| }); |
There was a problem hiding this comment.
What are you verifying in this test?
|
Hi @mickhansen , changed the condition and removed |
|
Looks great @sushantdhiman, could you change the test to use a lower limit than the count? |
|
Let me know if this is correct behavior @mickhansen SELECT
AS INNER JOIN LEFT OUTER JOIN ( ORDER BY This means first we filter by LIMIT then apply JOINS on filtered IDs, Is this correct? |
|
The limit has to be on the inner query so it limits the rows we want to limit and not the cartesian product. |
* Used correct ids generated by created records to prevent Fk-Pk issues
Conflicts: changelog.md
|
@mickhansen If that example is correct way then great, I have changed the I would like to mention that when we change order to Since we have limited task id to |
|
@sushantdhiman Ordering shouldn't matter, a bug if it does. |
|
Thanks |
Fixed the
subQuerygeneration which cause nestedincludesto be applied on main query. It also add other tests and fixes achieved due to this fix.Fixes #4191, Fixes #3009, Fixes #5445
Closes #5530, Closes #5446, Closes #4378
May be it will close more issues, I will check and include tests in further PRs