{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angularfire2/issues/603","repository_url":"https://api.github.com/repos/angular/angularfire2","labels_url":"https://api.github.com/repos/angular/angularfire2/issues/603/labels{/name}","comments_url":"https://api.github.com/repos/angular/angularfire2/issues/603/comments","events_url":"https://api.github.com/repos/angular/angularfire2/issues/603/events","html_url":"https://github.com/angular/angularfire2/issues/603","id":181812659,"number":603,"title":"database list query with multiple Subject parameters","user":{"login":"nelsonad","id":1216943,"avatar_url":"https://avatars.githubusercontent.com/u/1216943?v=3","gravatar_id":"","url":"https://api.github.com/users/nelsonad","html_url":"https://github.com/nelsonad","followers_url":"https://api.github.com/users/nelsonad/followers","following_url":"https://api.github.com/users/nelsonad/following{/other_user}","gists_url":"https://api.github.com/users/nelsonad/gists{/gist_id}","starred_url":"https://api.github.com/users/nelsonad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nelsonad/subscriptions","organizations_url":"https://api.github.com/users/nelsonad/orgs","repos_url":"https://api.github.com/users/nelsonad/repos","events_url":"https://api.github.com/users/nelsonad/events{/privacy}","received_events_url":"https://api.github.com/users/nelsonad/received_events","type":"User","site_admin":false},"labels":[{"id":309980364,"url":"https://api.github.com/repos/angular/angularfire2/labels/pr_action:%20discuss","name":"pr_action: discuss","color":"fbca04","default":false},{"id":309980356,"url":"https://api.github.com/repos/angular/angularfire2/labels/type:%20feature","name":"type: feature","color":"EEEEEE","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2016-10-08T08:20:46Z","updated_at":"2016-11-22T21:55:57Z","closed_at":"2016-11-03T02:09:42Z","body":"Here's a plunker of what I'm trying to do, and it has the issues I'm seeing with needing to perform a search twice before getting results back\nhttp://plnkr.co/edit/HaWIwkhPWz08qJT6mYuJ?p=preview\n\nBasically I have composite keys so I can search multiple fields with a single query, and based on the search terms supplied I need to change which key I search on. So I'm setting query.orderByChild and query.equalTo to two different Subject variables and calling next() on them both during a search.\n\nI dont know if there's a different way to accomplish this, but what I'm doing doesn't seem to work.\n\nI also tried setting the whole query object to a Subject variable and calling next on it (example next({orderByChild: 'state', equalTo: 0}), but that didnt work either.\n"},"comment":{"url":"https://api.github.com/repos/angular/angularfire2/issues/comments/262377592","html_url":"https://github.com/angular/angularfire2/issues/603#issuecomment-262377592","issue_url":"https://api.github.com/repos/angular/angularfire2/issues/603","id":262377592,"user":{"login":"rosslavery","id":656884,"avatar_url":"https://avatars.githubusercontent.com/u/656884?v=3","gravatar_id":"","url":"https://api.github.com/users/rosslavery","html_url":"https://github.com/rosslavery","followers_url":"https://api.github.com/users/rosslavery/followers","following_url":"https://api.github.com/users/rosslavery/following{/other_user}","gists_url":"https://api.github.com/users/rosslavery/gists{/gist_id}","starred_url":"https://api.github.com/users/rosslavery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rosslavery/subscriptions","organizations_url":"https://api.github.com/users/rosslavery/orgs","repos_url":"https://api.github.com/users/rosslavery/repos","events_url":"https://api.github.com/users/rosslavery/events{/privacy}","received_events_url":"https://api.github.com/users/rosslavery/received_events","type":"User","site_admin":false},"created_at":"2016-11-22T21:55:57Z","updated_at":"2016-11-22T21:55:57Z","body":"Just chiming in to say I've noticed the same behaviour.\r\n\r\nWhen using 2 (or 3) subjects to update a list query, it requires you to push the values twice to the subjects to perform the query.\r\n\r\n```\r\n    return this.angularFire.database.list(`/${CLIENT_FEED_PATH}/${clientId}`, {\r\n      query: {\r\n        orderByChild: this.orderByField$,\r\n        equalTo: this.fieldEqualTo$,\r\n        limitToFirst: this.itemLimit$\r\n      }\r\n    })\r\n```\r\n\r\nWhatever function I use to push new values to these subjects using `.next()` needs to be fired twice for the values emitted by the `.list()` to update to the correctly-filtered ones."}}
{"actor":{"display_login":"rosslavery"}}