Skip to content
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

Count doesn't return a number when used in subquery #840

Closed
Wardormeur opened this issue Mar 14, 2018 · 1 comment
Closed

Count doesn't return a number when used in subquery #840

Wardormeur opened this issue Mar 14, 2018 · 1 comment

Comments

@Wardormeur
Copy link

Hi,
First of all, thanks a lot for this library :)
When querying a count through a subquery (as shown here : http://vincit.github.io/objection.js/#getting-count-of-relations), the query results returns a string rather than a number
The corresponding tests are the following, which I would consider to be an unexpected result.

it('should work in select', () => {

If this is related to #744 and how $relatedQuery is supposed to evolve, please feel free to close this issue :)
Thanks again,
W.

@Wardormeur
Copy link
Author

Apologies, it seems to be unrelated to objectionjs.
For further reading, brianc/node-postgres#353 (comment)
knex/knex#387

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant