Sails: Sorting by non non-model fields and no schema

Created on 27 Dec 2018  路  5Comments  路  Source: balderdashy/sails

Sails version: 1.1.0
Node version: 11.4.0
NPM version: 6.4.1
DB adapter name: sails-mongo
DB adapter version: ^1.0.1
Operating system: Mac OS




Trying to sort by non-mentioned in the model files field (using "schema: false") and getting "Cannot read property 'columnName' of undefined". Got no problems when using fields described in model files.

Also, it used to work fine until I migrated to v1 (from v.012). Now fixed this for myself, changing forge-stage-three-query.js to processed not known fields.

https://github.com/balderdashy/sails/issues/4105 and https://trello.com/c/b57sDgVr/124-adapter-spec-change-to-allow-for-more-flexible-base-values seem related.

does this answer your question? mongo orm

Most helpful comment

Same problem here and exactly same configuration:

Sails version: 1.1.0
Node version: 11.4.0
NPM version: 6.4.1
DB adapter name: sails-mongo
DB adapter version: ^1.0.1
Operating system: Mac OS

All 5 comments

Hi @solovieff! It looks like you missed a step or two when you created your issue. Please edit your comment (use the pencil icon at the top-right corner of the comment box) and fix the following:

  • Provide your Sails version
  • Provide your Node version
  • Provide your NPM version
  • Provide your DB adapter name
  • Provide your DB adapter version
  • Provide your Operating system
  • Verify "I am experiencing a concrete technical issue (aka a bug) with Sails (ideas and feature proposals should follow the guide for proposing features and enhancements (http://bit.ly/sails-feature-guide), which involves making a pull request). If you're not 100% certain whether it's a bug or not, that's okay--you may continue. The worst that can happen is that the issue will be closed and we'll point you in the right direction."
  • Verify "I am not asking a question about how to use Sails or about whether or not Sails has a certain feature (please refer to the documentation(http://sailsjs.com), or post on http://stackoverflow.com, our Google Group (http://bit.ly/sails-google-group) or our live chat (https://gitter.im/balderdashy/sails)."
  • Verify "I have already searched for related issues, and found none open (if you found a related _closed_ issue, please link to it in your post)."
  • Verify "My issue title is concise, on-topic and polite ("jst.js being removed from layout.ejs on lift" is good; "templates dont work" or "why is sails dumb" are not so good)."
  • Verify "I have tried all the following (if relevant) and my issue remains:"
  • Verify "I can provide steps to reproduce this issue that others can follow."

As soon as those items are rectified, post a new comment (e.g. “Ok, fixed!”) below and we'll take a look. Thanks!

*If you feel this message is in error, or you want to debate the merits of my existence (sniffle), please contact [email protected]

Ok, fixed!

@solovieff Thanks for posting, we'll take a look as soon as possible.


For help with questions about Sails, click here. If you’re interested in hiring @sailsbot and her minions in Austin, click here.

Same problem here and exactly same configuration:

Sails version: 1.1.0
Node version: 11.4.0
NPM version: 6.4.1
DB adapter name: sails-mongo
DB adapter version: ^1.0.1
Operating system: Mac OS

@solovieff @saccodd
I was also able to reproduce this issue:
(TypeError: Cannot read property 'columnName' of undefined)
with the same configuration and versions.

We welcome a PR for sails-mongo if anyone is wanting to offer a patch.

Was this page helpful?
0 / 5 - 0 ratings