title: cakephp-3.0 get table object from aliased Plugin Entity
body: <p>I have an instance of an Entity and I need to get its table</p>
  
  <p>I'm doing the following and it works fine most of the time: </p>
  
  <pre><code>$className =  $entity-&gt;source();
  $entityTable = TableRegistry::get($className);
  </code></pre>
  
  <p>the problem arises with aliased Plugin entities: let's say I have a <code>Users</code> plugin and a <code>Group</code> model in it with this relationship</p>
  
  <pre><code>//plugins/Users/src/Model/Table/GroupsTable
  
  $this-&gt;belongsTo('Parents', [
      'className' =&gt; 'Users.Groups',
      'foreignKey' =&gt; 'parent_id'
  ]);
  </code></pre>
  
  <p>now in a controller I'm doing something like:</p>
  
  <pre><code>$groupsTable = TableRegistry::get('Users.Groups');
  $group = $groupsTable-&gt;get($some_id, ['contain' =&gt; 'Parents']);
  $className =  $group-&gt;parent-&gt;source();
  </code></pre>
  
  <p>now <code>$className</code> contain <code>'Parents'</code> while I expect <code>'Users.Parents'</code></p>
  
  <p>how can I get the class name prefixed with the Plugin name? I tried <code>$this-&gt;belongsTo('Users.Parents', ...)</code> but it does not seem to work</p>