Skip to content

update collection remove problem #115

@lineCode

Description

@lineCode

Describe the bug
// resets the addresses collection to a single item
wrap(user).assign({ addresses: [new Address(...)] });

this will insert new items before, and delete old items after, if the has unique index, the may throw conflict error

Expected behavior
delete old items first, and insert new items after

Versions

Dependency Version
node v16.14.0
typescript 4.3.5
mikro-orm 5.6.14
your-driver mysql

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