Closed jbrhinalyn closed 11 months ago
Sorry, we do not have enough information to know why the query works with the CLI and not with Lucid. There are too many knowns for us. Are you running queries against the same DB, same version?
You need to debug it further yourself and report an issue, if you need Lucid to be generating incorrect queries
Prerequisites
I have this script in my Controller let availabilities = await Availability.query().select("id","available").orderBy("available","asc")
When I open in the browser, it gives me this error: {"message":"select [id], [available] from [availabilities] order by [available] asc - Invalid object name 'availabilities'."}
But when I run this SQL to sqlcmd select [id], [available] from [availabilities] order by [available] asc - Invalid object name 'availabilities'. It works.
What could the cause of this? Any help highly appreciated.