-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fastJoin Error #645
Comments
Not sure if you resolved this, but you probably want to change your hook from a |
+1, I have the same issue:
I can use the hook in |
As far as I'm aware (very happy if someone can show me I'm wrong), fastJoin only works in after hooks. It takes the data the service has loaded and uses that data to find the related items. I personally hit issues with this when I'm looking to filter on joined data. In these cases I modify the knex query (I'm almost all in PostgresSQL) in a before hook. Other possible solutions might be: custom service where you do all querying/updating in service calls; using view tables; pre-loading data in before hooks. |
Version: 5.0.6 with feathers version 4.5.11
I'm working with fastJoin and for some reason unable to get it to work. Code:
I'm using this in a before hook:
Error message:
"TypeError: Cannot read property 'data' of undefined\n at /app/node_modules/feathers-hooks-common/lib/services/fast-join.js:13:48\n at /app/node_modules/feathers-hooks-common/node_modules/@feathersjs/commons/lib/hooks.js:116:46\n at processTicksAndRejections (node:internal/process/task_queues:94:5)"
The text was updated successfully, but these errors were encountered: