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

Fix handling of @Id property in Java records #2756

Closed
sothawo opened this issue Nov 8, 2023 · 0 comments · Fixed by #2757
Closed

Fix handling of @Id property in Java records #2756

sothawo opened this issue Nov 8, 2023 · 0 comments · Fixed by #2757
Assignees
Labels
type: bug A general bug

Comments

@sothawo
Copy link
Collaborator

sothawo commented Nov 8, 2023

spring-data-commons introduced the PersistentProperty.isReadable() method in spring-projects/spring-data-commons#2915, a method that SimpleElasticsearchPersistentProperty has had for years and that is now calling the new base implementation. This broke handling of Java record classes in so far as that the @Id annotated property of a record could not be set anymore after storing an entity in Elasticsearch while having the id autogenerated.

@sothawo sothawo added the type: bug A general bug label Nov 8, 2023
@sothawo sothawo added this to the 5.2 GA (2023.1.0) milestone Nov 8, 2023
@sothawo sothawo self-assigned this Nov 8, 2023
sothawo added a commit to sothawo/spring-data-elasticsearch that referenced this issue Nov 8, 2023
sothawo added a commit that referenced this issue Nov 8, 2023
@sothawo sothawo changed the title Fix handling of @Id properrty in Java records Fix handling of @Id property in Java records Nov 8, 2023
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 a pull request may close this issue.

1 participant