Skip to content

Return value of BeforeConvertCallback.onBeforeConvert() is not used when actually saving #1295

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
idemockle opened this issue Aug 3, 2022 · 1 comment
Assignees
Labels
type: bug A general bug

Comments

@idemockle
Copy link

When I create a copy of the entity passed into BeforeConvertCallback.onBeforeConvert(), make changes to the copy, then return the copy, the original entity object is used to generate the insert query instead of the modified copy. I would expect the copy to be used instead, otherwise it's hard for me to see why onBeforeConvert() would return a value.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Aug 3, 2022
@mp911de mp911de self-assigned this Aug 4, 2022
@mp911de mp911de added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels Aug 4, 2022
@mp911de mp911de changed the title Return value of BeforeConvertCallback.onBeforeConvert() is not used when actually saving Return value of BeforeConvertCallback.onBeforeConvert() is not used when actually saving Aug 4, 2022
@mp911de
Copy link
Member

mp911de commented Aug 4, 2022

This is a bug in the CassandraTemplate and AsyncCassandraTemplate classes where the insert of non-versioned entities is affected.

@mp911de mp911de added this to the 3.3.7 (2021.1.7) milestone Aug 4, 2022
@mp911de mp911de closed this as completed in b25a67c Aug 4, 2022
mp911de added a commit that referenced this issue Aug 4, 2022
… insert.

We now use correctly the result of the `onBeforeConvert` callback for insert instead of the original entity.

Closes #1295
mp911de added a commit that referenced this issue Aug 4, 2022
… insert.

We now use correctly the result of the `onBeforeConvert` callback for insert instead of the original entity.

Closes #1295
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

No branches or pull requests

3 participants