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 in karras.collections/fetch is broken. #4

Open
bhenry opened this issue Nov 18, 2010 · 3 comments
Open

:count in karras.collections/fetch is broken. #4

bhenry opened this issue Nov 18, 2010 · 3 comments

Comments

@bhenry
Copy link

bhenry commented Nov 18, 2010

it appears that fetch doesn't work with the count flag.

i tried this:

(fetch Client nil :count true) ;;it was inside with-mongo-request

i got back:

java.lang.IllegalArgumentException: Don't know how to create ISeq from: java.lang.Integer
[Thrown class java.lang.RuntimeException]

this however works fine:

(fetch Client nil :limit 1)

NOTE: I ended up using karras.entity/count-instances, but didn't know if the above was expected to work as it is still in the code.

@wilkes
Copy link
Owner

wilkes commented Nov 18, 2010

that's weird since count-instances ultimately uses
(karras.collection/fetch coll criteria :count true)

Maybe karras.entity/fetch is broken. I'll look into it.

@bhenry
Copy link
Author

bhenry commented Nov 18, 2010

you're right. karras.entity/fetch is trying to map (partial make type) over the count.

@wilkes
Copy link
Owner

wilkes commented Nov 18, 2010

Ah, I need to beef up the tests. Use count-instances in the mean time.

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

2 participants