Skip to content

Feature(QueryTools): added possibility to query subobjects in livequery #3274

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

Closed
wants to merge 1 commit into from
Closed

Feature(QueryTools): added possibility to query subobjects in livequery #3274

wants to merge 1 commit into from

Conversation

stck
Copy link

@stck stck commented Dec 22, 2016

I've added possibility to subscribe to nested object with LiveQuery.
(not real code example)

{
    ...
    type: 'input',
    attributes: {
      disabled: false,
      class: 'input-class'
    }
}

For example, at this moment I can't subscribe for object.attributes.class. I've added possibility to look up for nested keys, but left match detection unchanged.

var q = new Parse.Query('Activities');
q.equalTo('attributes.class', 'input-class');
  • Tests added
  • Whole-project tests passed

@dstarke
Copy link
Contributor

dstarke commented Jan 5, 2017

I filed bug #3321 for this issue. I didn't see this pull request before I filed pull request #3322, which fixes the same issue.

However, I don't believe that the version in this pull request works correctly for queries that have more than one condition that test a subobject. If one such condition matches and another does not, the code here can return a match when it should not.

As a result, I would recommend using the code in pull request #3322, rather than the code here.

@acinader
Copy link
Contributor

acinader commented Jan 7, 2017

duplicate of #3322

thanks for the effort @stck

@acinader acinader closed this Jan 7, 2017
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.

4 participants