{"action":"created","issue":{"url":"https://api.github.com/repos/marmelab/ng-admin/issues/1013","repository_url":"https://api.github.com/repos/marmelab/ng-admin","labels_url":"https://api.github.com/repos/marmelab/ng-admin/issues/1013/labels{/name}","comments_url":"https://api.github.com/repos/marmelab/ng-admin/issues/1013/comments","events_url":"https://api.github.com/repos/marmelab/ng-admin/issues/1013/events","html_url":"https://github.com/marmelab/ng-admin/issues/1013","id":145087284,"number":1013,"title":"Using referenced_list with Loopbak","user":{"login":"sm-g","id":7280273,"avatar_url":"https://avatars3.githubusercontent.com/u/7280273?v=3","gravatar_id":"","url":"https://api.github.com/users/sm-g","html_url":"https://github.com/sm-g","followers_url":"https://api.github.com/users/sm-g/followers","following_url":"https://api.github.com/users/sm-g/following{/other_user}","gists_url":"https://api.github.com/users/sm-g/gists{/gist_id}","starred_url":"https://api.github.com/users/sm-g/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sm-g/subscriptions","organizations_url":"https://api.github.com/users/sm-g/orgs","repos_url":"https://api.github.com/users/sm-g/repos","events_url":"https://api.github.com/users/sm-g/events{/privacy}","received_events_url":"https://api.github.com/users/sm-g/received_events","type":"User","site_admin":false},"labels":[{"id":101480995,"url":"https://api.github.com/repos/marmelab/ng-admin/labels/help%20wanted","name":"help wanted","color":"159818","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-04-01T05:01:36Z","updated_at":"2017-03-30T09:23:15Z","closed_at":"2017-03-30T09:23:15Z","body":"I wonder, am I missing something or ng-admin does not work with standard Loopback API for filtering in `referenced_list` field?\n\nng-admin config:\n\n```\nbusinesses.creationView()\n    .fields([\n      nga.field('_id')\n      nga.field('branches', 'referenced_list')\n        .targetEntity(admin.getEntity('branches'))\n        .targetReferenceField('businessid')\n        .targetFields([\n          nga.field('_id'),\n        ])\n    ]);\n```\n\nloopback config:\n\n```\n{\n  \"name\": \"Branch\",\n  \"base\": \"EntityBase\",\n  \"properties\": {\n  },\n  \"relations\": {\n    \"business\": {\n      \"type\": \"belongsTo\",\n      \"model\": \"Business\",\n      \"foreignKey\": \"\"\n    }\n  },\n}\n```\n\nWhen open business edit view with list of child branches, in `addFullRequestInterceptor` `params._filters` equals `{\"businessid\":5}`, which is invalid for Loopback. So I have to\n\n```\n      if (params._filters) {\n        _.forEach(params._filters, function(value, entry) {\n            params[`filter[where][${entry}]`]=value;\n        });\n        delete params._filters;\n      }\n```\n"},"comment":{"url":"https://api.github.com/repos/marmelab/ng-admin/issues/comments/290353210","html_url":"https://github.com/marmelab/ng-admin/issues/1013#issuecomment-290353210","issue_url":"https://api.github.com/repos/marmelab/ng-admin/issues/1013","id":290353210,"user":{"login":"Kmaschta","id":1819833,"avatar_url":"https://avatars1.githubusercontent.com/u/1819833?v=3","gravatar_id":"","url":"https://api.github.com/users/Kmaschta","html_url":"https://github.com/Kmaschta","followers_url":"https://api.github.com/users/Kmaschta/followers","following_url":"https://api.github.com/users/Kmaschta/following{/other_user}","gists_url":"https://api.github.com/users/Kmaschta/gists{/gist_id}","starred_url":"https://api.github.com/users/Kmaschta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kmaschta/subscriptions","organizations_url":"https://api.github.com/users/Kmaschta/orgs","repos_url":"https://api.github.com/users/Kmaschta/repos","events_url":"https://api.github.com/users/Kmaschta/events{/privacy}","received_events_url":"https://api.github.com/users/Kmaschta/received_events","type":"User","site_admin":false},"created_at":"2017-03-30T09:23:15Z","updated_at":"2017-03-30T09:23:15Z","body":"Hello,\r\n\r\nAs explained in the [README](https://github.com/marmelab/ng-admin/blob/master/README.md), the GitHub issue tracker is for bugs and enhancement requests.\r\nSo I close this issue, but feel free to write a question on [StackOverflow with the tag `ng-admin`](http://stackoverflow.com/questions/tagged/ng-admin).\r\n\r\nThanks for using ng-admin!"}}
{"actor":{"display_login":"Kmaschta"}}