-
-
Notifications
You must be signed in to change notification settings - Fork 470
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
Issue #1346 - Add ability to project document metadata to document properties #1364
Conversation
Wow! @barryhagan I'll try to review it today or tomorrow. |
Hey all, I think I want to review this one. I'm a bit leery at how many changes this spawned. |
@barryhagan sorry, a recent PR merge has resulted in a conflict with one of your file changes. Could you please rebase it? |
236e1f3
to
a69bbb5
Compare
rebased |
@jeremydmiller could you please review this PR and provide your feedback? |
@barryhagan, I was reviewing this and observed some breaking changes. Hence ran a binary compatibility check against v3.10.0 as baseline using
Note that some of them are false positives i.e. Could you please check on the above? |
@jeremydmiller @oskardudycz @jokokko I will send a PR later today (already implemented it) which will help us run the binary compatibility checks using |
I'm merging this into #1337 |
I shouldn't have closed this yesterday:( What's going to happen though is that I'm probably going to take the configuration code and the tests from this pull request, but use a different implementation in the v4 codebase |
|
I cherry picked this a little bit and used the configuration and tests from this PR to make the real feature in v4. |
These changes are somewhat involved in order to ensure that the projected metadata fields in the jsonb match the actual metadata columns as best as possible.
In order to do the read-only validation, the metadata of a document is always stored in the IIdentityMap rather than making another db call. This also makes it possible to used cached metadata when calling
MetadataFor<T>
in an IQuerySession. It should only be required to go to the database for metadata if the doc wasn't already loaded in session (or loaded by a user defined query).Performance considerations:
MetadataFor<T>
.Public API breaking changes:
The only potential breaking change is adding a parameter to
Marten.Schema.Arguments.UpsertArgument.CompileBulkImporter()
and its overrides. This seemed like something that should be internal anyway, but it could be adjusted if necessary to prevent a binary break on these public methods.API surface change report:
https://github.com/barryhagan/marten/commit/236e1f312cf114556debaa3354e27b1cad484e3b/checks?check_suite_id=250920331#step:6:6
In a perfect world: