Flow UI 2.3.1 DTO with composition

A view that relies on a DTO class in composition does not behave as it does in views generated from entities, while it works correctly in the Classic UI version.
I created an Entity Employee DTO that contains a collection of Addresses in composition, I generated the Address and Employee views, executed the project the composition does not work.
Doing the same thing with classic ui everything works correctly.

@JmixEntity
public class Address {
    @JmixGeneratedValue
    @JmixId
    private UUID id;

    @JmixProperty(mandatory = true)
    @NotNull
    private String streetName;

    private String streetNumber;

    public String getStreetNumber() {
        return streetNumber;
    }

    public void setStreetNumber(String streetNumber) {
        this.streetNumber = streetNumber;
    }

    public String getStreetName() {
        return streetName;
    }

    public void setStreetName(String streetName) {
        this.streetName = streetName;
    }

    public UUID getId() {
        return id;
    }

    public void setId(UUID id) {
        this.id = id;
    }
}
@JmixEntity
public class Employee {
    @JmixGeneratedValue
    @JmixId
    private UUID id;

    @InstanceName
    @JmixProperty(mandatory = true)
    @NotNull
    private String name;

    @JmixProperty(mandatory = true)
    @NotNull
    private String surname;

    @Composition
    private Collection<Address> addresses;

    public Collection<Address> getAddresses() {
        return addresses;
    }

    public void setAddresses(Collection<Address> addresses) {
        this.addresses = addresses;
    }

    public String getSurname() {
        return surname;
    }

    public void setSurname(String surname) {
        this.surname = surname;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public UUID getId() {
        return id;
    }

    public void setId(UUID id) {
        this.id = id;
    }
}

Please take into account these changes in Jmix 2.x: DTO Entities in Standard Views

In particular:

If the whole entity instance is passed instead of ID (e.g. when opening in a dialog window), EntityStates.isNew() is used to distinguish between Edit and Create mode. Consequently, it’s important to set the entity in the not-new state after loading it from a storage. For a DTO entity it can be done using the new EntityStates.setNew() method, for JPA entity it’s done by the standard JPA data store implementation.

So it’s important how you load your DTOs. See an example here: TaskService.java

Regards,
Konstantin