Skip to content
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

@Sequence Annotation generates a new Id on update #2003

Open
lbueker opened this issue Feb 26, 2025 · 2 comments · May be fixed by #2005
Open

@Sequence Annotation generates a new Id on update #2003

lbueker opened this issue Feb 26, 2025 · 2 comments · May be fixed by #2005
Assignees
Labels
type: bug A general bug

Comments

@lbueker
Copy link

lbueker commented Feb 26, 2025

Version: spring-data-jdbc:3.5.0-M1
Currently when using the @Sequence annotation in an entity, it seems to generate a new value on each save.

This results in an error, when trying to update an entity complaining that the newly generated id is not available in the database.

I think there should be a check, so it only generates a new value, when there is none set.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Feb 26, 2025
@mipo256
Copy link
Contributor

mipo256 commented Mar 2, 2025

Hey @schauder @mp911de. This problem is related to the following change: #1955
Please, assign this issue to me, I'll take a look what went wrong

@mp911de mp911de added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels Mar 3, 2025
@mp911de
Copy link
Member

mp911de commented Mar 3, 2025

Thanks @lbueker for trying out milestones. @mipo256 assigned to you.

mipo256 added a commit to mipo256/spring-data-relational that referenced this issue Mar 4, 2025
mipo256 added a commit to mipo256/spring-data-relational that referenced this issue Mar 4, 2025
mipo256 added a commit to mipo256/spring-data-relational that referenced this issue Mar 7, 2025
@mp911de mp911de added this to the 3.5 RC1 (2025.0.0) milestone Mar 19, 2025
mipo256 added a commit to mipo256/spring-data-relational that referenced this issue Mar 19, 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
4 participants