You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After some update of adonis framework and its library, suddenly I received this error when i use .has() or .whereHas() on all my route. It's worked before.
This is the example code:
let accounts = await Account.query()
.with('account_subclassification')
.has('account_subclassification')
.fetch()
without .has() and .whereHas(), it worked normally.
And here are the complete error messages:
TypeError: Cannot read property 'queryContext' of undefined
1
at Formatter.wrapAsIdentifier (D:\Workspace\pusatdagangutama\api.pusatdagangutama.com\node_modules\knex\lib\formatter.js line 147 col 37)
2
at Formatter.wrapString (D:\Workspace\pusatdagangutama\api.pusatdagangutama.com\node_modules\knex\lib\formatter.js line 246 col 27)
3
at Formatter.wrap (D:\Workspace\pusatdagangutama\api.pusatdagangutama.com\node_modules\knex\lib\formatter.js line 142 col 21)
4
at Formatter.wrapString (D:\Workspace\pusatdagangutama\api.pusatdagangutama.com\node_modules\knex\lib\formatter.js line 244 col 27)
5
at Formatter.wrap (D:\Workspace\pusatdagangutama\api.pusatdagangutama.com\node_modules\knex\lib\formatter.js line 142 col 21)
6
at Formatter.columnize (D:\Workspace\pusatdagangutama\api.pusatdagangutama.com\node_modules\knex\lib\formatter.js line 57 col 19)
7
at Proxy.columnize (D:\Workspace\pusatdagangutama\api.pusatdagangutama.com\node_modules\@adonisjs\lucid\src\Lucid\Relations\BaseRelation.js line 245 col 42)
8
at Proxy.relatedWhere (D:\Workspace\pusatdagangutama\api.pusatdagangutama.com\node_modules\@adonisjs\lucid\src\Lucid\Relations\BelongsTo.js line 125 col 22)
9
at Proxy._has (D:\Workspace\pusatdagangutama\api.pusatdagangutama.com\node_modules\@adonisjs\lucid\src\Lucid\QueryBuilder\index.js line 177 col 43)
10
at Proxy.whereHas (D:\Workspace\pusatdagangutama\api.pusatdagangutama.com\node_modules\@adonisjs\lucid\src\Lucid\QueryBuilder\index.js line 714 col 12)
11
at LucidTestingController.index (D:\Workspace\pusatdagangutama\api.pusatdagangutama.com\app\Controllers\Http\Testing\LucidTestingController.js line 19 col 14)
12
at Server._routeHandler (D:\Workspace\pusatdagangutama\api.pusatdagangutama.com\node_modules\@adonisjs\framework\src\Server\index.js line 326 col 31)
13
at Server._resolveMiddleware (D:\Workspace\pusatdagangutama\api.pusatdagangutama.com\node_modules\@adonisjs\framework\src\Server\index.js line 216 col 28)
14
at Runnable._invoke (D:\Workspace\pusatdagangutama\api.pusatdagangutama.com\node_modules\co-compose\src\Runnable.js line 76 col 42)
15
at once (D:\Workspace\pusatdagangutama\api.pusatdagangutama.com\node_modules\co-compose\src\Runnable.js line 73 col 34)
16
at f (D:\Workspace\pusatdagangutama\api.pusatdagangutama.com\node_modules\once\once.js line 25 col 25)
The text was updated successfully, but these errors were encountered:
Hi friend,
Can you help me?
After some update of adonis framework and its library, suddenly I received this error when i use
.has()
or.whereHas()
on all my route. It's worked before.This is the example code:
or
without
.has()
and.whereHas()
, it worked normally.And here are the complete error messages:
The text was updated successfully, but these errors were encountered: