title: Laravel relation problem after update to version 6
body: <p>i updated laravel version from 5.6 to 6 one week ago for implementing new things on my API, problem is after the update one of my relations just broke.
  At certain point after login i need to retrieve some info based on who is connected, on a 3 level relation (cme_permissions.subcomisionData.members) and it brokes on second level (cme_permissions.subcomisionData), i looked at this using dd() step by step.
  I'm just starting into this world of programming and i don't know what the heck is happening, thanks for the help.</p>
  <p>Query:</p>
  <pre><code>User::where('id', Auth::user()-&gt;id)
        -&gt;with('cme_permissions.subcomisionData.members')-&gt;get();
  </code></pre>
  <p>First relation (User):</p>
  <pre><code>    public function cme_permissions() {
        return $this-&gt;hasMany('App\CME\CMEPermission');
      }
  
  </code></pre>
  <p>Second relation:</p>
  <pre><code>class CMEPermission extends Model
  {
      public $table = 'cme_permissions';
  
      public function subcomisionData() {
          return $this-&gt;belongsTo('App\CME\CMESubcomision', 'subcomision');
      }
  
      function user() {
        return $this-&gt;belongsTo('App\User');
      }
  }
  
  </code></pre>
  <p>Third relation:</p>
  <pre><code>class CMESubcomision extends Model
  {
    public $table = 'cme_subcomision';
    public $incrementing = false;
    public $timestamps = false;
  
    public function members() {
      return $this-&gt;hasMany('App\CME\CMEPermission', 'subcomision')
        -&gt;with('user');
    }
  
  }
  
  </code></pre>
  <p>This still works on my pre-version before the update so i don't know if the problem is with the dependencies in composer.json or what, whatever here it is:
  Composer.json</p>
  <pre><code>{
      &quot;name&quot;: &quot;laravel/laravel&quot;,
      &quot;type&quot;: &quot;project&quot;,
      &quot;description&quot;: &quot;The Laravel Framework.&quot;,
      &quot;keywords&quot;: [
          &quot;framework&quot;,
          &quot;laravel&quot;
      ],
      &quot;license&quot;: &quot;MIT&quot;,
      &quot;require&quot;: {
          &quot;php&quot;: &quot;^7.1.3&quot;,
          &quot;fideloper/proxy&quot;: &quot;^4.0&quot;,
          &quot;guzzlehttp/guzzle&quot;: &quot;^6.3&quot;,
          &quot;laravel/framework&quot;: &quot;6.0.*&quot;,
          &quot;laravel/passport&quot;: &quot;^7.1&quot;,
          &quot;laravel/tinker&quot;: &quot;^1.0&quot;,
          &quot;league/csv&quot;: &quot;^9.5&quot;,
          &quot;elibyy/tcpdf-laravel&quot;: &quot;6.0.*&quot;
      },
      &quot;require-dev&quot;: {
          &quot;barryvdh/laravel-ide-helper&quot;: &quot;^2.6&quot;,
          &quot;beyondcode/laravel-dump-server&quot;: &quot;^1.0&quot;,
          &quot;filp/whoops&quot;: &quot;^2.0&quot;,
          &quot;fzaninotto/faker&quot;: &quot;^1.4&quot;,
          &quot;mockery/mockery&quot;: &quot;^1.0&quot;,
          &quot;nunomaduro/collision&quot;: &quot;^3.0&quot;,
          &quot;phpunit/phpunit&quot;: &quot;^7.5&quot;
      },
      &quot;config&quot;: {
          &quot;optimize-autoloader&quot;: true,
          &quot;preferred-install&quot;: &quot;dist&quot;,
          &quot;sort-packages&quot;: true
      },
      &quot;extra&quot;: {
          &quot;laravel&quot;: {
              &quot;dont-discover&quot;: []
          }
      },
      &quot;autoload&quot;: {
          &quot;psr-4&quot;: {
              &quot;App\\&quot;: &quot;app/&quot;
          },
          &quot;classmap&quot;: [
              &quot;database/seeds&quot;,
              &quot;database/factories&quot;
          ]
      },
      &quot;autoload-dev&quot;: {
          &quot;psr-4&quot;: {
              &quot;Tests\\&quot;: &quot;tests/&quot;
          }
      },
      &quot;minimum-stability&quot;: &quot;dev&quot;,
      &quot;prefer-stable&quot;: true,
      &quot;scripts&quot;: {
          &quot;post-autoload-dump&quot;: [
              &quot;Illuminate\\Foundation\\ComposerScripts::postAutoloadDump&quot;,
              &quot;@php artisan package:discover --ansi&quot;
          ],
          &quot;post-root-package-install&quot;: [
              &quot;@php -r \&quot;file_exists('.env') || copy('.env.example', '.env');\&quot;&quot;
          ],
          &quot;post-create-project-cmd&quot;: [
              &quot;@php artisan key:generate --ansi&quot;
          ]
      }
  }
  </code></pre>
  <p>Edit: It doesn't display any error just a null on the second relation</p>
  <pre><code>      #relations: array:1 [
          &quot;cme_permissions&quot; =&gt; Illuminate\Database\Eloquent\Collection {#469
            #items: array:1 [
              0 =&gt; App\CME\CMEPermission {#466
                +table: &quot;cme_permissions&quot;
                #connection: &quot;mysql&quot;
                #primaryKey: &quot;id&quot;
                #keyType: &quot;int&quot;
                +incrementing: true
                #with: []
                #withCount: []
                #perPage: 15
                +exists: true
                +wasRecentlyCreated: false
                #attributes: array:5 [
                  &quot;id&quot; =&gt; 2
                  &quot;user_id&quot; =&gt; 1685
                  &quot;email&quot; =&gt; &quot;PRU_0004@mail.es&quot;
                  &quot;subcomision&quot; =&gt; &quot;1.1&quot;
                  &quot;cme_role&quot; =&gt; &quot;Vocal&quot;
                ]
                #original: array:5 [
                  &quot;id&quot; =&gt; 2
                  &quot;user_id&quot; =&gt; 1685
                  &quot;email&quot; =&gt; &quot;PRU_0004@mail.es&quot;
                  &quot;subcomision&quot; =&gt; &quot;1.1&quot;
                  &quot;cme_role&quot; =&gt; &quot;Vocal&quot;
                ]
                #changes: []
                #casts: []
                #dates: []
                #dateFormat: null
                #appends: []
                #dispatchesEvents: []
                #observables: []
                #relations: array:1 [
                  &quot;subcomisionData&quot; =&gt; null
                ]
  </code></pre>