Skip to content

Field named id treated as document id. #1261

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

Merged

Conversation

mikereiche
Copy link
Collaborator

@mikereiche mikereiche commented Oct 21, 2021

Should use entity.getIdProperty() to identify the id property. property.isIdProperty() only identifies if a property could be an IdProperty (by having an annotation or being named id). It doesn't indicate if the property actually is the id property - only entity.getIdProperty() does that.

Closes #1258.

  • You have read the Spring Data contribution guidelines.
  • There is a ticket in the bug tracker for the project in our JIRA.
  • You use the code formatters provided here and have them applied to your changes. Don’t submit any formatting related changes.
  • You submit test cases (unit or integration tests) that back your changes.
  • You added yourself as author in the headers of the classes you touched. Amend the date range in the Apache license header if needed. For new types, add the license header (copy from another file and set the current year only).

@mikereiche mikereiche requested a review from daschl October 21, 2021 23:21
@mikereiche mikereiche merged commit 9f2d7ee into main Oct 26, 2021
@mikereiche mikereiche deleted the datacouch_1258_field_named_id_treated_as_document_id branch December 10, 2021 22:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"id" as field name getting populated with meta().id in the response
1 participant