Repository navigation
Fix for generateThroughJoin - #6053
Conversation
| limit: 5, | ||
| offset: 0, | ||
| order: [ | ||
| [ { raw: '\`Entity.votes\`' }, 'DESC' ] |
There was a problem hiding this comment.
Please use proper order syntax for tests, we don't garantee raw
There was a problem hiding this comment.
@mickhansen I have to use raw / sequelize.literal as there is problem with when using
order: [
[ this.sequelize.col('Entity.votes'), 'DESC' ]
]I'll raise a separate issue for the same.
There was a problem hiding this comment.
@harshithkashyap And what when you use the proper nested order syntax from the docs?
There was a problem hiding this comment.
@mickhansen I did. I used
order: [Entity,'votes', 'DESC']- Sequelize generates
ORDER BYEntity.votesDESC;which should be ``Entity.votesDESC. Here, `Entity.votes` should be a single string - The order is not applied to the subquery
|
Might be simpler to provide this as a sql unit test focusing on where the error happens. |
|
@mickhansen I've added insert queries & filtered expectations to the test. |
|
@felixfbecker @sushantdhiman Unit Tests were requested by @mickhansen for this PR. But the Incorrent Join identifier is used here and i've submitted a patch for the same. Tests pass in my local instance. Travis CI seems to be stuck because of Deadlock. Could you guys restart the same? |
|
@felixfbecker @sushantdhiman @janmeier @mickhansen Hey guys, could you review this please? |
|
I am not the right person to approve/reject these changes besides code style |
Current coverage is 94.50% (diff: 100%)
|
|
Ping @janmeier |
|
We have plenty of other unit tests for SQL generation for joins, it should be possible to cover this case aswell. |
Pull Request check-list
npm run testornpm run test-DIALECTpass with this change (including linting)?Futurein the changelog?Description of change
Added Failing test case & patch for #6052