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

Finding multiple IDs returns out-of-order results #13

Closed
mshick opened this issue Nov 30, 2014 · 5 comments
Closed

Finding multiple IDs returns out-of-order results #13

mshick opened this issue Nov 30, 2014 · 5 comments

Comments

@mshick
Copy link
Contributor

mshick commented Nov 30, 2014

eg

db.rel.find('foo', [ 3, 2, 1 ]);
--> [ { id: 1 }, { id: 2 }, { id: 3 } ]

Ideally, with an array provided, the results would be returned in the same order as they are specified.

@nolanlawson
Copy link
Member

That's reasonable, but I'd have to double-check what the Ember adapters do. I think they might return them in alphabetical order.

Ostensibly relational-pouch is Ember-independent, but in practice I'm trying to model it pretty closely after Ember Data :P .

@nolanlawson
Copy link
Member

So I would say that the current functionality is fine. Since the user can't be sure of what the underlying Ember Data adapter will return the order in, I'm not going to advocate for one order or another in my own adapter.

Also I tend to like it better the current way. :P

@mshick
Copy link
Contributor Author

mshick commented Nov 30, 2014

Cool, I understand. Maybe a note in the docs?

I've been accomplishing ordering in a then() operation; works well enough.

Thanks!

@nolanlawson
Copy link
Member

Open a pull req on the README either here or in ember-pouch, and I would love to include it. :)

@mshick
Copy link
Contributor Author

mshick commented Nov 30, 2014

Revised the PR. I looked through the code, but wasn't grokking the ordering. Thanks for explaining.

nolanlawson pushed a commit that referenced this issue Nov 30, 2014
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