{"action":"created","issue":{"url":"https://api.github.com/repos/devnixs/ODataAngularResources/issues/55","repository_url":"https://api.github.com/repos/devnixs/ODataAngularResources","labels_url":"https://api.github.com/repos/devnixs/ODataAngularResources/issues/55/labels{/name}","comments_url":"https://api.github.com/repos/devnixs/ODataAngularResources/issues/55/comments","events_url":"https://api.github.com/repos/devnixs/ODataAngularResources/issues/55/events","html_url":"https://github.com/devnixs/ODataAngularResources/issues/55","id":145394843,"number":55,"title":"Saving expand & selects in the returned resource object","user":{"login":"kyse","id":785002,"avatar_url":"https://avatars.githubusercontent.com/u/785002?v=3","gravatar_id":"","url":"https://api.github.com/users/kyse","html_url":"https://github.com/kyse","followers_url":"https://api.github.com/users/kyse/followers","following_url":"https://api.github.com/users/kyse/following{/other_user}","gists_url":"https://api.github.com/users/kyse/gists{/gist_id}","starred_url":"https://api.github.com/users/kyse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kyse/subscriptions","organizations_url":"https://api.github.com/users/kyse/orgs","repos_url":"https://api.github.com/users/kyse/repos","events_url":"https://api.github.com/users/kyse/events{/privacy}","received_events_url":"https://api.github.com/users/kyse/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-02T17:07:09Z","updated_at":"2016-04-05T20:09:27Z","closed_at":"2016-04-05T20:09:27Z","body":"Was thinking about when I need to run an update on a resource from the array of resources.  I know I can grab the resource and do entity.$odata().get(), but would be nice not to have to reapply my selects and expands.  So end result would be a new version of my resource object with the same expanded table and fields as the original call that made the request.   Just throwing this out there for thoughts before I went down the rabbit hole.  Does this logic not belong stored in the resource and should remain the end users responsibility to reapply to the odataprovider before calling get()?  If not transformed,  the @Odata.context property of the response contains the Metadata for recreating the necessesary select/expand calls. "},"comment":{"url":"https://api.github.com/repos/devnixs/ODataAngularResources/issues/comments/205972076","html_url":"https://github.com/devnixs/ODataAngularResources/issues/55#issuecomment-205972076","issue_url":"https://api.github.com/repos/devnixs/ODataAngularResources/issues/55","id":205972076,"user":{"login":"kyse","id":785002,"avatar_url":"https://avatars.githubusercontent.com/u/785002?v=3","gravatar_id":"","url":"https://api.github.com/users/kyse","html_url":"https://github.com/kyse","followers_url":"https://api.github.com/users/kyse/followers","following_url":"https://api.github.com/users/kyse/following{/other_user}","gists_url":"https://api.github.com/users/kyse/gists{/gist_id}","starred_url":"https://api.github.com/users/kyse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kyse/subscriptions","organizations_url":"https://api.github.com/users/kyse/orgs","repos_url":"https://api.github.com/users/kyse/repos","events_url":"https://api.github.com/users/kyse/events{/privacy}","received_events_url":"https://api.github.com/users/kyse/received_events","type":"User","site_admin":false},"created_at":"2016-04-05T20:09:27Z","updated_at":"2016-04-05T20:09:27Z","body":"Created pull request #60 to support this concept.  Hopefully the added (non-enumerable) $refresh field on the responses doesn't break anything for folks.  With the way the resource provider is built, and since a response as an array doesn't adding methods to the array prototype, this is the only solution I could come up with.\r\n\r\nCould possibly use Object.create([], { $refresh: { value: refreshFn }}) syntax, but afraid not all browsers support the extend argument in object.create."}}