{"action":"created","issue":{"url":"https://api.github.com/repos/bfanger/angular-activerecord/issues/26","repository_url":"https://api.github.com/repos/bfanger/angular-activerecord","labels_url":"https://api.github.com/repos/bfanger/angular-activerecord/issues/26/labels{/name}","comments_url":"https://api.github.com/repos/bfanger/angular-activerecord/issues/26/comments","events_url":"https://api.github.com/repos/bfanger/angular-activerecord/issues/26/events","html_url":"https://github.com/bfanger/angular-activerecord/pull/26","id":161832920,"number":26,"title":"Add single-loaded(from server) relations declaration using `$relations` property","user":{"login":"ajcastro","id":4918318,"avatar_url":"https://avatars.githubusercontent.com/u/4918318?v=3","gravatar_id":"","url":"https://api.github.com/users/ajcastro","html_url":"https://github.com/ajcastro","followers_url":"https://api.github.com/users/ajcastro/followers","following_url":"https://api.github.com/users/ajcastro/following{/other_user}","gists_url":"https://api.github.com/users/ajcastro/gists{/gist_id}","starred_url":"https://api.github.com/users/ajcastro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajcastro/subscriptions","organizations_url":"https://api.github.com/users/ajcastro/orgs","repos_url":"https://api.github.com/users/ajcastro/repos","events_url":"https://api.github.com/users/ajcastro/events{/privacy}","received_events_url":"https://api.github.com/users/ajcastro/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-06-23T03:28:56Z","updated_at":"2016-06-28T14:08:24Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/bfanger/angular-activerecord/pulls/26","html_url":"https://github.com/bfanger/angular-activerecord/pull/26","diff_url":"https://github.com/bfanger/angular-activerecord/pull/26.diff","patch_url":"https://github.com/bfanger/angular-activerecord/pull/26.patch"},"body":"Please see the Defining Relations section in the README.md of my fork. Thanks! :)\r\n\r\nPS:\r\nThis has no automated test but I tested it manually."},"comment":{"url":"https://api.github.com/repos/bfanger/angular-activerecord/issues/comments/229059990","html_url":"https://github.com/bfanger/angular-activerecord/pull/26#issuecomment-229059990","issue_url":"https://api.github.com/repos/bfanger/angular-activerecord/issues/26","id":229059990,"user":{"login":"bfanger","id":207248,"avatar_url":"https://avatars.githubusercontent.com/u/207248?v=3","gravatar_id":"","url":"https://api.github.com/users/bfanger","html_url":"https://github.com/bfanger","followers_url":"https://api.github.com/users/bfanger/followers","following_url":"https://api.github.com/users/bfanger/following{/other_user}","gists_url":"https://api.github.com/users/bfanger/gists{/gist_id}","starred_url":"https://api.github.com/users/bfanger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bfanger/subscriptions","organizations_url":"https://api.github.com/users/bfanger/orgs","repos_url":"https://api.github.com/users/bfanger/repos","events_url":"https://api.github.com/users/bfanger/events{/privacy}","received_events_url":"https://api.github.com/users/bfanger/received_events","type":"User","site_admin":false},"created_at":"2016-06-28T14:08:24Z","updated_at":"2016-06-28T14:08:24Z","body":"I like the simplicity of your implementation of relations (just mapping the objects  to classes), but managing relations is a feature that can become complex really fast.\r\n\r\nCould you write the relation feature as a separate optional js file? like a plugin?\r\n```js\r\nvar initialize = ActiveRecord.prototype.$initialize;\r\nActiveRecord.prototype.$initialize = function $initializeWithRelations(properties, options) {\r\n    initialize.apply(this, arguments);\r\n    ... relation code here ...\r\n}\r\n```\r\nThat way ActiveRecord matches Backbone.Model and people can opt-in to your implementation of use their own.\r\n\r\n"}}
{"actor":{"display_login":"bfanger"}}