{"action":"created","issue":{"url":"https://api.github.com/repos/cakephp/cakephp/issues/7187","labels_url":"https://api.github.com/repos/cakephp/cakephp/issues/7187/labels{/name}","comments_url":"https://api.github.com/repos/cakephp/cakephp/issues/7187/comments","events_url":"https://api.github.com/repos/cakephp/cakephp/issues/7187/events","html_url":"https://github.com/cakephp/cakephp/issues/7187","id":99389520,"number":7187,"title":"source() method on aliased plugin Entity","user":{"login":"arilia","id":4802541,"avatar_url":"https://avatars.githubusercontent.com/u/4802541?v=3","gravatar_id":"","url":"https://api.github.com/users/arilia","html_url":"https://github.com/arilia","followers_url":"https://api.github.com/users/arilia/followers","following_url":"https://api.github.com/users/arilia/following{/other_user}","gists_url":"https://api.github.com/users/arilia/gists{/gist_id}","starred_url":"https://api.github.com/users/arilia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arilia/subscriptions","organizations_url":"https://api.github.com/users/arilia/orgs","repos_url":"https://api.github.com/users/arilia/repos","events_url":"https://api.github.com/users/arilia/events{/privacy}","received_events_url":"https://api.github.com/users/arilia/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cakephp/cakephp/labels/On%20hold","name":"On hold","color":"eb6420"},{"url":"https://api.github.com/repos/cakephp/cakephp/labels/ORM","name":"ORM","color":"ffffff"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/cakephp/cakephp/milestones/55","html_url":"https://github.com/cakephp/cakephp/milestones/3.0.12","labels_url":"https://api.github.com/repos/cakephp/cakephp/milestones/55/labels","id":1243170,"number":55,"title":"3.0.12","description":"Bugfixes and enhancements for 3.0.x","creator":{"login":"markstory","id":24086,"avatar_url":"https://avatars.githubusercontent.com/u/24086?v=3","gravatar_id":"","url":"https://api.github.com/users/markstory","html_url":"https://github.com/markstory","followers_url":"https://api.github.com/users/markstory/followers","following_url":"https://api.github.com/users/markstory/following{/other_user}","gists_url":"https://api.github.com/users/markstory/gists{/gist_id}","starred_url":"https://api.github.com/users/markstory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markstory/subscriptions","organizations_url":"https://api.github.com/users/markstory/orgs","repos_url":"https://api.github.com/users/markstory/repos","events_url":"https://api.github.com/users/markstory/events{/privacy}","received_events_url":"https://api.github.com/users/markstory/received_events","type":"User","site_admin":false},"open_issues":22,"closed_issues":3,"state":"open","created_at":"2015-08-06T02:07:36Z","updated_at":"2015-08-06T10:27:29Z","due_on":"2015-08-26T04:00:00Z","closed_at":null},"comments":2,"created_at":"2015-08-06T08:56:20Z","updated_at":"2015-08-06T10:46:44Z","closed_at":null,"body":"about this question I opened in stackoverflow\r\n\r\nhttp://stackoverflow.com/questions/31848771/cakephp-3-0-get-table-object-from-aliased-plugin-entity\r\n\r\nwhat I did\r\n\r\n    //plugins/Users/src/Model/Table/GroupsTable.php\r\n\r\n    $this->belongsTo('Parents', [\r\n        'className' => 'Users.Groups',\r\n        'foreignKey' => 'parent_id'\r\n    ]);\r\n\r\n---\r\n    // Some controller\r\n\r\n    $groupsTable = TableRegistry::get('Users.Groups');\r\n    $group = $groupsTable->get($some_id, ['contain' => 'Parents']);\r\n    $className =  $group->parent->source();\r\n\r\nwhat I expected\r\n\r\n`$className` contains `Users.Parents`\r\n\r\nwhat I get\r\n\r\n`$className` contains `Parents` without the reference to the plugin name\r\n"},"comment":{"url":"https://api.github.com/repos/cakephp/cakephp/issues/comments/128322366","html_url":"https://github.com/cakephp/cakephp/issues/7187#issuecomment-128322366","issue_url":"https://api.github.com/repos/cakephp/cakephp/issues/7187","id":128322366,"user":{"login":"arilia","id":4802541,"avatar_url":"https://avatars.githubusercontent.com/u/4802541?v=3","gravatar_id":"","url":"https://api.github.com/users/arilia","html_url":"https://github.com/arilia","followers_url":"https://api.github.com/users/arilia/followers","following_url":"https://api.github.com/users/arilia/following{/other_user}","gists_url":"https://api.github.com/users/arilia/gists{/gist_id}","starred_url":"https://api.github.com/users/arilia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arilia/subscriptions","organizations_url":"https://api.github.com/users/arilia/orgs","repos_url":"https://api.github.com/users/arilia/repos","events_url":"https://api.github.com/users/arilia/events{/privacy}","received_events_url":"https://api.github.com/users/arilia/received_events","type":"User","site_admin":false},"created_at":"2015-08-06T10:46:44Z","updated_at":"2015-08-06T10:46:44Z","body":"I have an entity, and I need to instantiate its table.\r\n\r\nIf I use `TableRegistry::get();` with the alias I don't get the right table if the entity comes from a plugin. How can I get the entity table? Is there another way than unig `source()`?"}}