{"action":"created","issue":{"url":"https://api.github.com/repos/punkave/apostrophe/issues/571","repository_url":"https://api.github.com/repos/punkave/apostrophe","labels_url":"https://api.github.com/repos/punkave/apostrophe/issues/571/labels{/name}","comments_url":"https://api.github.com/repos/punkave/apostrophe/issues/571/comments","events_url":"https://api.github.com/repos/punkave/apostrophe/issues/571/events","html_url":"https://github.com/punkave/apostrophe/issues/571","id":157741882,"number":571,"title":"[apostrophe-docs] Cursor clone doesn't always clone everything","user":{"login":"jth-","id":8812820,"avatar_url":"https://avatars.githubusercontent.com/u/8812820?v=3","gravatar_id":"","url":"https://api.github.com/users/jth-","html_url":"https://github.com/jth-","followers_url":"https://api.github.com/users/jth-/followers","following_url":"https://api.github.com/users/jth-/following{/other_user}","gists_url":"https://api.github.com/users/jth-/gists{/gist_id}","starred_url":"https://api.github.com/users/jth-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jth-/subscriptions","organizations_url":"https://api.github.com/users/jth-/orgs","repos_url":"https://api.github.com/users/jth-/repos","events_url":"https://api.github.com/users/jth-/events{/privacy}","received_events_url":"https://api.github.com/users/jth-/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/punkave/apostrophe/labels/0.6+","name":"0.6+","color":"bfe5bf"},{"url":"https://api.github.com/repos/punkave/apostrophe/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":{"login":"boutell","id":32125,"avatar_url":"https://avatars.githubusercontent.com/u/32125?v=3","gravatar_id":"","url":"https://api.github.com/users/boutell","html_url":"https://github.com/boutell","followers_url":"https://api.github.com/users/boutell/followers","following_url":"https://api.github.com/users/boutell/following{/other_user}","gists_url":"https://api.github.com/users/boutell/gists{/gist_id}","starred_url":"https://api.github.com/users/boutell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boutell/subscriptions","organizations_url":"https://api.github.com/users/boutell/orgs","repos_url":"https://api.github.com/users/boutell/repos","events_url":"https://api.github.com/users/boutell/events{/privacy}","received_events_url":"https://api.github.com/users/boutell/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2016-05-31T18:43:51Z","updated_at":"2016-06-01T20:12:45Z","closed_at":"2016-06-01T20:12:45Z","body":"Docs cursor has a `.clone()` method, which is notably used to run `toCount` queries using an equivalent cursor ahead of running a `toArray` query. However, since it creates a new cursor through: \r\n\r\n```javascript\r\nvar cursor = self.apos.create(self.__meta.name, options);\r\n```\r\n\r\nIt doesn't get piece-specific filters added to it that are added by overriding the pieces .`find()` method and adding filters to the retrieved cursor. For example, running a `toCount` on the image piece type doesn't get the `minSize` filter added, causing the `toCount` results to potentially differ from the results of the `toArray`. (The implementation of the `minSize` filter is in images cursor.js, the override of the pieces find for images is in images api.js).\r\n\r\n@boutell Not sure where the fix belongs on this one. Should we change how we are adding filters for specific piece types, or change how we construct an additional cursor when cloning?"},"comment":{"url":"https://api.github.com/repos/punkave/apostrophe/issues/comments/223110415","html_url":"https://github.com/punkave/apostrophe/issues/571#issuecomment-223110415","issue_url":"https://api.github.com/repos/punkave/apostrophe/issues/571","id":223110415,"user":{"login":"jth-","id":8812820,"avatar_url":"https://avatars.githubusercontent.com/u/8812820?v=3","gravatar_id":"","url":"https://api.github.com/users/jth-","html_url":"https://github.com/jth-","followers_url":"https://api.github.com/users/jth-/followers","following_url":"https://api.github.com/users/jth-/following{/other_user}","gists_url":"https://api.github.com/users/jth-/gists{/gist_id}","starred_url":"https://api.github.com/users/jth-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jth-/subscriptions","organizations_url":"https://api.github.com/users/jth-/orgs","repos_url":"https://api.github.com/users/jth-/repos","events_url":"https://api.github.com/users/jth-/events{/privacy}","received_events_url":"https://api.github.com/users/jth-/received_events","type":"User","site_admin":false},"created_at":"2016-06-01T20:12:45Z","updated_at":"2016-06-01T20:12:45Z","body":"Resolved in #573"}}
{"actor":{"display_login":"jth-"}}