Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Custom-named model fields break when offsetting, ordering, and including hasMany simultaneously. #5985
What you are doing?
Sequelize doesn't seem to understand the naming of fields in the database outside of a subquery clause when ordering, offsetting and including members from a hasMany relationship. Here is an example:
What do you expect to happen?
I expect a proper data set in return.
What is actually happening?
The output throws. This appears to be because the SQL that happens is the following:
This causes postgres to return the following error:
The proper query should be: