OneToMany relation doesn't list elements

78 Views Asked by At

I tried to get a list from using easy admin bundle items that have a OneToMany relation.

My Member entity :

/**
 * @ORM\OneToMany(targetEntity="Declaration", mappedBy="user")
 */
private $declarations;

My yaml file for Member:

list:
    fields:
        - { property: 'declarations', label: 'Label', template: 'type.html.twig'}

But I get the error

[Semantical Error] line 0, col 60 near 'declarations': Error: Invalid PathExpression. StateFieldPathExpression or SingleValuedAssociationField expected.

0

There are 0 best solutions below