title: Eloquent's Many-to-Many inverse is not fetched
body: <p>I have 2 models namely Role and User models. With the following code respectively on each models:</p>
  
  <p>Role.php:</p>
  
  <pre><code>public function users(){
      return $this-&gt;belongsToMany('\Models\User', 'rbac_user_roles','role_id','username');
  }
  </code></pre>
  
  <p>..</p>
  
  <p>User.php:</p>
  
  <pre><code>public function roles(){
      return $this-&gt;belongsToMany('\Models\RBAC\Role', 'rbac_user_roles','username','role_id');
  }
  </code></pre>
  
  <p>but when I try to dump the data like so:</p>
  
  <pre><code>$model = Role::find( 1);
  $model2 = User::find( 'test_user');
  
  var_dump( $model-&gt;users-&gt;toArray() );
  var_dump( $model2-&gt;roles-&gt;toArray() );
  </code></pre>
  
  <p>The $model->users->toArray() finds actual data while $model2->roles->toArray() returns nothing. Which is odd because I am pretty sure that the code works correctly. 
  With this, I would like to ask, is there an effect if the primary key for the database is a string for eloquent? because I believe this is the culprit here. If so, what can i do to remedy the situation?</p>
  
  <p>The situation needs/has the following conditions
  -> Can't add a new column for index enabled auto-increment key for users table
  -> All table and data is correctly setup, as the first var_dump() actually dumps the correct data.</p>
  
  <p>Thanks,</p>
  
  <p>Jan</p>
  
  <p>EDIT:</p>
  
  <p>I also tried the following in getting the User:</p>
  
  <pre><code>$model2 = User::where( 'username', 'test_user')-&gt;get()-&gt;first();
  </code></pre>
  
  <p>Note: The primary key for the table Users is a string</p>