Skip to content

Reorder statements so the order is better suitable for batch operations #1155

Closed
@schauder

Description

@schauder

For an Aggregate Root A with a collections of B entities which in turn has a collection of C entities, insert operations are are structured like this:

  1. insert A
  2. insert 1. B
  3. insert 1. C of 1.B
  4. insert 2. C of 1.B
    ...
  5. insert 1. B
  6. insert 1. C of 2.B
  7. insert 2. C of 2.B
    ...

This is not well suited for batch operations.
For those we should execute the statements in the following order:

  1. insert A
  2. insert 1. B
  3. insert 1. B
    ...
  4. insert 1. C of 1.B
  5. insert 2. C of 1.B
  6. insert 1. C of 2.B
  7. insert 2. C of 2.B
    ...

See also #537

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