-
Notifications
You must be signed in to change notification settings - Fork 636
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
Subqueries break upgrading from 1.4.0 to 1.5.3 #1205
Comments
This is probably a bug in objection. I'm on vacation for three weeks. I'll look into this after I'm back |
Thank you for this @koskimas! And super thanks for objection.js - words cannot describe how much I ❤️it and how pleasurable it is to use. |
objection 1.6 is now released with a fix for this issue. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Greetings,
Subqueries using
.with
are no longer working as expected when I upgrade from1.4.0
to1.5.3
.The above code takes a
query
, which is an objection model.query()
and uses it to construct a subquery using.with
to return a basic row count.Under
1.4.0
, the following correct SQL is generated:Under
1.5.3
, the following incorrect SQL is generated:It appears that under
1.5.3
, the originalquery
object loses its modeltablename
and/or is overridden by the.from('pager_subquery')
method call.I had a look through the change log and couldn't find anything that indicates that this behaviour has changed.
Is this a bug or has Objection changed this behaviour? If the latter, any hints or clues would appreciated.
Libraries:
0.16.3
7.8.0
The text was updated successfully, but these errors were encountered: