Closed jaroslav-muller closed 8 years ago
@jaroslav-muller: Hello, I'm a repo bot-- nice to meet you!
It has been 30 days since there have been any updates or new comments on this page. If this issue has been resolved, feel free to disregard the rest of this message and simply close the issue if possible. On the other hand, if you are still waiting on a patch, please post a comment to keep the thread alive (with any new information you can provide).
If no further activity occurs on this thread within the next 3 days, the issue will automatically be closed.
Thanks so much for your help!
This is still reproducible and it definitely feels like a bug. Please, don't close it unless you either fix it or convince me it's not a bug.
@jaroslav-muller We don't support deep querying like this. In this case you would need to switch the query around and search the actionType
and populate the action
.
This query should work but it throws an error:
models.collections.action.find({'actionType': {name: '1'}})
Error is:
The source of the error seems to be that at line
currentSchema = this.schema[tableName].attributes
waterline uses table name 'actionType' (model name) where it should use 'action_type' (table name).If you use the same string for table name and model name such a query works OK.
Also a simpler queries, which are not joining the action_type table work OK:
Following is a complete script that reproduces the behaviour: