Hydrate Embeddedable using Annotations

Hi,

I am using Annotations to create some less important forms.

One entity has several Embeddable included and it seems I can’t hydrate properly to/from object.

Argument 1 passed to Warehouse\Entity\Format::setLength() must be an instance of Application\Entity\BasicDimension or null, array given

The embeddable is defined like this:

/**
* @ORM\Embedded(class=\Application\Entity\BasicDimension, columnPrefix=length)
*
* @Annotation\Name(length)
* @Annotation\Type(Fieldset)
* @Annotation\Type(\Application\Form\BasicDimensionFieldset)
* @Annotation\Options({label:Lungime})
*/
protected ?BasicDimension $length = null;

/**

  • @ORM\Embeddable
  • @Annotation\Type(“fieldset”)
    */
    class BasicDimension
    {
    use ValueUpperTrait;
    use MuDimensionUpperTrait;
    }

What should I do to make this work?