{"action":"created","issue":{"url":"https://api.github.com/repos/joshcam/PHP-MySQLi-Database-Class/issues/267","labels_url":"https://api.github.com/repos/joshcam/PHP-MySQLi-Database-Class/issues/267/labels{/name}","comments_url":"https://api.github.com/repos/joshcam/PHP-MySQLi-Database-Class/issues/267/comments","events_url":"https://api.github.com/repos/joshcam/PHP-MySQLi-Database-Class/issues/267/events","html_url":"https://github.com/joshcam/PHP-MySQLi-Database-Class/pull/267","id":97010444,"number":267,"title":"Added hasManyThrough relation and store relations in variable","user":{"login":"vedmant","id":5052406,"avatar_url":"https://avatars.githubusercontent.com/u/5052406?v=3","gravatar_id":"","url":"https://api.github.com/users/vedmant","html_url":"https://github.com/vedmant","followers_url":"https://api.github.com/users/vedmant/followers","following_url":"https://api.github.com/users/vedmant/following{/other_user}","gists_url":"https://api.github.com/users/vedmant/gists{/gist_id}","starred_url":"https://api.github.com/users/vedmant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vedmant/subscriptions","organizations_url":"https://api.github.com/users/vedmant/orgs","repos_url":"https://api.github.com/users/vedmant/repos","events_url":"https://api.github.com/users/vedmant/events{/privacy}","received_events_url":"https://api.github.com/users/vedmant/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2015-07-24T09:16:21Z","updated_at":"2015-07-27T10:18:08Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/joshcam/PHP-MySQLi-Database-Class/pulls/267","html_url":"https://github.com/joshcam/PHP-MySQLi-Database-Class/pull/267","diff_url":"https://github.com/joshcam/PHP-MySQLi-Database-Class/pull/267.diff","patch_url":"https://github.com/joshcam/PHP-MySQLi-Database-Class/pull/267.patch"},"body":"Hi, I've added hasManyThrough relation and make it store relations in variable for not to making new query and object each time when relation is called.\r\n\r\nAlso I've removed get() from many relations, because it's impossible to add some additional conditions, for example I want to get user's post that are published, so I can call $user->posts->where('published', 1)->get(); However this change can break somebody's code if he used many relation in current way.\r\n\r\nSorry, but I didn't add documentation, I may add it later if will have time."},"comment":{"url":"https://api.github.com/repos/joshcam/PHP-MySQLi-Database-Class/issues/comments/125156545","html_url":"https://github.com/joshcam/PHP-MySQLi-Database-Class/pull/267#issuecomment-125156545","issue_url":"https://api.github.com/repos/joshcam/PHP-MySQLi-Database-Class/issues/267","id":125156545,"user":{"login":"avbdr","id":3286514,"avatar_url":"https://avatars.githubusercontent.com/u/3286514?v=3","gravatar_id":"","url":"https://api.github.com/users/avbdr","html_url":"https://github.com/avbdr","followers_url":"https://api.github.com/users/avbdr/followers","following_url":"https://api.github.com/users/avbdr/following{/other_user}","gists_url":"https://api.github.com/users/avbdr/gists{/gist_id}","starred_url":"https://api.github.com/users/avbdr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avbdr/subscriptions","organizations_url":"https://api.github.com/users/avbdr/orgs","repos_url":"https://api.github.com/users/avbdr/repos","events_url":"https://api.github.com/users/avbdr/events{/privacy}","received_events_url":"https://api.github.com/users/avbdr/received_events","type":"User","site_admin":false},"created_at":"2015-07-27T10:18:08Z","updated_at":"2015-07-27T10:18:08Z","body":"but library already have hasOne caching:\r\n```\r\n        if (isset ($this->data[$name]) && $this->data[$name] instanceof dbObject)\r\n            return $this->data[$name];\r\n...\r\nreturn $this->data[$name] = $obj->byId($this->data[$key]);\r\n```\r\nMaybe lets forget about all this mods and will finish implementation of hasMany, hasManyThough and belongsTo?"}}