Skip to content

GH-2064 BeforeConvertCallback should be applied after the RootAggrega… #2065

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
wants to merge 1 commit into from

Conversation

mipo256
Copy link
Contributor

@mipo256 mipo256 commented Jun 1, 2025

Closes #2064

Hey @mp911de, @schauder.

After giving it a couple of tries, I've come up with this solution. The idea is to separate the doInBatch and saveInBatch. The reason is that in doInBatch there is an implicit assumption, that the Function that accepts the entity to create an AggregateChange will just create an AggregateChange. But in case of saveAll, there were a conditional logic also applied in the Function (like what change to create, UPDATE or INSERT).

So, in case of any suggestions or question, feel free to reach out, thanks!

…the RootAggregateChange creation

Signed-off-by: mipo256 <mikhailpolivakha@gmail.com>
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jun 1, 2025
@mp911de mp911de added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels Jun 2, 2025
@mp911de
Copy link
Member

mp911de commented Jun 2, 2025

Thanks a lot for having a look and picking up on maintenance, this is really helpful.

schauder pushed a commit that referenced this pull request Jun 11, 2025
Signed-off-by: mipo256 <mikhailpolivakha@gmail.com>

Commit message edited by Jens Schauder.

Original pull request #2065
Closes #2064
schauder added a commit that referenced this pull request Jun 11, 2025
Adding sizes to VARCHAR fields.

Original pull request #2065
See #2064
schauder added a commit that referenced this pull request Jun 11, 2025
VARCHAR should not be used with Oracle.

Original pull request #2065
See #2064
schauder added a commit that referenced this pull request Jun 11, 2025
Formatting.
Simplification of code.

Original pull request #2065
See #2064
@schauder
Copy link
Contributor

Thanks for this.

I had to apply some changes:

  1. The integration tests for Sql Server and Oracle failed to errors in the SQL scripts. You can run all integration tests by running ./mvnw clean verify -Pall-dbs.

  2. Formatting was a little off. Wildcard imports weren't applied as they should. You might want to check your setup.

This is merged.
Thanks again.

schauder pushed a commit that referenced this pull request Jun 11, 2025
Signed-off-by: mipo256 <mikhailpolivakha@gmail.com>

Commit message edited by Jens Schauder.

Original pull request #2065
Closes #2064
schauder added a commit that referenced this pull request Jun 11, 2025
Adding sizes to VARCHAR fields.

Original pull request #2065
See #2064
schauder added a commit that referenced this pull request Jun 11, 2025
VARCHAR should not be used with Oracle.

Original pull request #2065
See #2064
schauder added a commit that referenced this pull request Jun 11, 2025
Formatting.
Simplification of code.

Original pull request #2065
See #2064
schauder pushed a commit that referenced this pull request Jun 11, 2025
Signed-off-by: mipo256 <mikhailpolivakha@gmail.com>

Commit message edited by Jens Schauder.

Original pull request #2065
Closes #2064
schauder added a commit that referenced this pull request Jun 11, 2025
Adding sizes to VARCHAR fields.

Original pull request #2065
See #2064
schauder added a commit that referenced this pull request Jun 11, 2025
VARCHAR should not be used with Oracle.

Original pull request #2065
See #2064
schauder added a commit that referenced this pull request Jun 11, 2025
Formatting.
Simplification of code.

Original pull request #2065
See #2064
@schauder schauder added this to the 3.4.7 (2024.1.7) milestone Jun 11, 2025
@schauder schauder closed this Jun 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

spring data jdbc: saveAll on null id's entities calls update statement
4 participants