Skip to content

Batch insert operations within a single aggregate. #1159

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
schauder opened this issue Feb 7, 2022 · 0 comments
Closed

Batch insert operations within a single aggregate. #1159

schauder opened this issue Feb 7, 2022 · 0 comments
Assignees
Labels
in: mapping Mapping and conversion infrastructure type: enhancement A general enhancement

Comments

@schauder
Copy link
Contributor

schauder commented Feb 7, 2022

For storing non trivial aggregates many operations need to get performed.
Those should be performed using JDBC batch operations to minimise database roundtrips.

There will be issues for the different kind of operations:

Not all JDBC drivers return generated ids for batch operations.
Therefore we'll need a Dialect property describing if a dialect supports this.
If an id is to be generated by the database and the database does not support batch inserts with generated keys we need to fall back to sequential operations.

This builds on the verification of #1155
Note that this is about batching for a single aggregate, while #537 takes this concept across aggregates.

@schauder schauder added epic: batching in: mapping Mapping and conversion infrastructure type: enhancement A general enhancement labels Feb 7, 2022
schauder pushed a commit that referenced this issue Mar 16, 2022
Insert for entities of same type within an aggregate get inserted using JDBC batch operations when possible.

Inserts are supported when no id needs to be generated by the database or if the Dialect supports generation of ids in batch operations.

Closes #1159
Original pull request # 1191
schauder added a commit that referenced this issue Mar 16, 2022
Formatting.

See #1159
Original pull request # 1191
schauder added a commit that referenced this issue Mar 16, 2022
Formatting.

See #1159
Original pull request # 1191
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: mapping Mapping and conversion infrastructure type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants