Skip to content

Fix id field target type conversion for document references. #3785

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 2 commits into from

Conversation

christophstrobl
Copy link
Member

This PR fixes an issue where a defined custom target type conversion for the id field was not properly considered when writing a document reference. Previously an eg. String was not being converted into an ObjectId correctly causing lookup queries to return empty results.
Converting the id property value on write solves the issue.

Includes a minor polish in the mapping centralizing pointer creation within the DocumentPointerFactory.

Closes: #3782

This commit fixes an issue where a defined custom target type conversion for the id field was not properly considered when writing a document reference.  Previously an eg. String was not being converted into an ObjectId correctly causing lookup queries to return empty results.
Converting the id property value on write solves the issue.
Includes a minor polish in the mapping centralizing pointer creation within the DocumentPointerFactory.

Closes: #3782
mp911de pushed a commit that referenced this pull request Aug 27, 2021
This commit fixes an issue where a defined custom target type conversion for the id field was not properly considered when writing a document reference.  Previously an eg. String was not being converted into an ObjectId correctly causing lookup queries to return empty results.
Converting the id property value on write solves the issue.
Includes a minor polish in the mapping centralizing pointer creation within the DocumentPointerFactory.

Closes: #3782
Original pull request: #3785.
@mp911de mp911de added the type: bug A general bug label Aug 27, 2021
@mp911de mp911de added this to the 3.3 M3 (2021.1.0) milestone Aug 27, 2021
@mp911de mp911de closed this Aug 27, 2021
@mp911de mp911de deleted the issue/3782 branch September 21, 2021 12:59
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.

Identifier conversion not considered during @DocumentReference construction
2 participants