Skip to content

Fix DocumentReference resolution for properties used in constructor. #3810

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

Closes: #3806

This commit fixes an issue that prevented referenced entities from being used as constructor arguments.
@mp911de mp911de self-assigned this Sep 8, 2021
mp911de pushed a commit that referenced this pull request Sep 8, 2021
This commit adds support for relational style One-To-Many references using a combination of ReadonlyProperty and @DocumentReference.
It allows to link types without explicitly storing the linking values within the document itself.

@document
class Publisher {

  @id
  ObjectId id;
  // ...

  @ReadOnlyProperty
  @DocumentReference(lookup="{'publisherId':?#{#self._id} }")
  List<Book> books;
}

Closes: #3806
Original pull request: #3810.
mp911de added a commit that referenced this pull request Sep 8, 2021
Tweak reference documentation wording. Extract self/target source dereferencing into utility methods.

See: #3806
Original pull request: #3810.
mp911de pushed a commit that referenced this pull request Sep 8, 2021
This commit fixes an issue that prevented referenced entities from being used as constructor arguments.

Closes: #3806
Original pull request: #3810.
@mp911de mp911de added this to the 3.3 M3 (2021.1.0) milestone Sep 8, 2021
@mp911de mp911de closed this Sep 8, 2021
@mp911de mp911de deleted the issue/3806 branch September 8, 2021 12:43
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.

Using @DocumentReference throws ConverterNotFoundException during constructor creation
2 participants