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

[MODEL] Fix wrong retrieval of records corresponding to indexed documents when querying multiple models #370

Closed
wants to merge 3 commits into from

Conversation

miguelff
Copy link
Contributor

This PR fixes #369

  • The first commit adds a fix for a regression introduced in Force no_timeout in mongoid adapter #335, to depart from a green build
  • The second commit includes:
    • A refactor over a case/when statement, as for objects. case/when only matches the branches in which === returns true. i.e. an object that is instance of a class. But if the object is a class itself, or a module like the adapters, it won't enter any of the when branches.
    • Taking back the call to compact over the collection of records, because as per eventual consistency, ES can return some results, which corresponding records no longer exist. As a consequence, calling records would return an array with positions including nil.
    • An integration test checking the correctness of the two points above.
  • The third commit cleans up a bit the integration tests for multiple model.

@miguelff miguelff changed the title 369 fix unmarshalling [MODEL] Fix wrong retrieval of records corresponding to indexed documents when querying multiple models Apr 17, 2015
karmi pushed a commit that referenced this pull request Apr 22, 2015
@karmi karmi closed this in 5fb9c56 Apr 22, 2015
karmi pushed a commit that referenced this pull request Apr 22, 2015
…egration test for the multiple adapter

Related: #370
karmi added a commit that referenced this pull request Apr 22, 2015
karmi added a commit that referenced this pull request Apr 22, 2015
@karmi
Copy link
Contributor

karmi commented Apr 22, 2015

@miguelff Thanks, merged!

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

Successfully merging this pull request may close these issues.

[MODEL] Wrong retrieval of records corresponding to indexed documents when querying multiple models.
2 participants