Skip to content

[Form] Handling entities reordering in collection type #4492

@maciej-pyszynski

Description

@maciej-pyszynski

Symfony default behaviour for handling reordering in collection type is wrong.

When you reorder to items saved in database as:

id: 56, name: first, order: 0
id: 57, name: second, order: 1

After changing they positions I receive:

id: 56, name: second, order: 0
id: 57, name: first, order: 1

Instead of:

id: 56, name: first, order: 1
id: 57, name: second, order: 0

Last occurrence at version 2.0.15

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions