Skip to content

Fields clashing with Include #2710

@benjaminhon

Description

@benjaminhon

When i do a query such as follows:

Node.find({
  include: {
    relation: 'device',
    scope: {
      fields: ['type', 'id'],
      include: {
        relation: 'locations',
        scope: {
          fields: ['lng', 'lat'],
          include: {
            relation: 'map',
            scope: {
              fields: ['name']
            }
          }
        }
      }
    }
  }
});

When i have the line fields: ['lng', 'lat'], then the relation _map_will not be included, however if i remove the fields: ['lng', 'lat'], then map is included again.

in my relations:

Location belongsTo Map
Map hasMany Location

I think this is a Bug

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