sequelize icon indicating copy to clipboard operation
sequelize copied to clipboard

fix: do not use aliased attribute for order if model name is set

Open bminer opened this issue 1 year ago • 7 comments

Pull Request Checklist

  • [ ] Have you added new tests to prevent regressions?
  • [x] If a documentation update is necessary, have you opened a PR to the documentation repository?
  • [x] Did you update the typescript typings accordingly (if applicable)?
  • [x] Does the description below contain a link to an existing issue (Closes #[issue]) or a description of the issue you are solving?
  • [ ] Does the name of your PR follow our conventions?

Description of Changes

Fixes #15422 by ensuring that the aliased attribute is not used when order is more than 2 elements (i.e. ["collection", "field", "ASC"])

Note that I have not created a test on this repo, but I do have a SSCCE: https://github.com/sequelize/sequelize-sscce/pull/243

List of Breaking Changes

bminer avatar Aug 02 '24 19:08 bminer

Note: this is against the v6 branch. EDIT: ~~There will also need to be a fix for the main branch!~~

bminer avatar Aug 02 '24 20:08 bminer

It seems that Oracle and MSSQL 2019 are currently broken in CI. I won't be able to look into it properly for another week at least (debugging from my phone is not smart to do). Oracle seems to be easy to fix, not sure what is wrong with MSSQL 2019

WikiRik avatar Aug 02 '24 20:08 WikiRik

It seems that Oracle and MSSQL 2019 are currently broken in CI. I won't be able to look into it properly for another week at least (debugging from my phone is not smart to do). Oracle seems to be easy to fix, not sure what is wrong with MSSQL 2019

Be aware this is against branch v6, so the CI/CD might be different for this branch.

bminer avatar Aug 02 '24 20:08 bminer

I do not think this problem exists in master branch (i.e. v7)

bminer avatar Aug 02 '24 21:08 bminer

@WikiRik - Are you just waiting for me to implement a test for this? Is this fix acceptable otherwise?

bminer avatar Aug 09 '24 16:08 bminer

Sorry for not responding before. It would be great if you could add a test

WikiRik avatar Oct 19 '24 07:10 WikiRik

Listen, I will write the test, but I want to express some frustration here. I already did the SSCCE thingy, and this PR is for 2 lines of code...

bminer avatar Oct 31 '24 17:10 bminer