Skip to content

[RELATIONSHIPS] Duplicate records with related relationships #84

@allanbarbosa

Description

@allanbarbosa

Hello, good afternoon.

I have a problem using the with method when getting relationships with the fetchRecordSet.

screen shot 2017-12-15 at 17 08 06

I have a nested code like that:

$operation = $atlas->select(OperationMapper::class) ->with([ 'credit' => [ 'credit_movement' => [ 'creditAttachement', 'attachment', ] ], ]) ->fetchRecordSet();

The result show two records, after we use the getArrayCopy method:

  1. In the first record, the object attachment came with two positions on array;
  2. In the second record, the object attachment shows an empty array;
  3. But both of records has one record each on Attachment object.

How we can solve this problem?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions