Skip to content

Nested includes leads to Error: "too much recursion" #167

Open
@Chilinot

Description

@Chilinot

Hi, i have the following models:

  client.define('role', {
    name: '',
    displayname: '',
    service_authorizations: {
      jsonApi: 'hasMany',
      type: 'service_authorization'
    }
  })

  client.define('service', {
    name: '',
    displayname: '',
    service_authorizations: {
      jsonApi: 'hasMany',
      type: 'service_authorization'
    }
  })

  client.define('service_authorization', {
    name: '',
    displayname: '',
    service: {
      jsonApi: 'hasOne',
      type: 'service'
    },
    roles: {
      jsonApi: 'hasMany',
      type: 'role'
    }
  })

When trying to fetch the roles and its relationships i use the following:

      this.$authApiClient.findAll('role', { include: ['service_authorizations', 'service_authorizations.service'] })

But it crashes with the error in the title.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions