AdonisJS is a TypeScript-first web framework for building web apps and API servers. It comes with support for testing, modern tooling, an ecosystem of official packages, and more.
case 1:
const countries = await Country.query()
.with('state.city')
.fetch()
case 2:
const citties = await City.query()
.with('cityState.stateCountry')
.fetch()
Now whichever I run first will work and give me proper result however running second case throw 500 Error
this.RelatedModel.query is not a function
Now If I restart the server and run the second case it'll work and the first one will stop working. Kindly help we're facing this issue. look like some kind of caching in issue in a query or in model ORM.
I have 3 model Country, State, City country.js
state.js
city.js
Now I'm trying to get two type of data
Now whichever I run first will work and give me proper result however running second case throw 500 Error
this.RelatedModel.query is not a function
Now If I restart the server and run the second case it'll work and the first one will stop working. Kindly help we're facing this issue. look like some kind of caching in issue in a query or in model ORM.