-
-
Notifications
You must be signed in to change notification settings - Fork 159
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
Native many to many #1037
Merged
Merged
Native many to many #1037
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…tionTests to use native many-to-many
… native many-to-many
Codecov Report
@@ Coverage Diff @@
## master #1037 +/- ##
==========================================
+ Coverage 91.10% 91.35% +0.24%
==========================================
Files 254 254
Lines 6894 6765 -129
==========================================
- Hits 6281 6180 -101
+ Misses 613 585 -28
Continue to review full report at Codecov.
|
… auto-generated join table entities in native many-to-many relationships.
maurei
suggested changes
Aug 2, 2021
src/JsonApiDotNetCore/Resources/Annotations/HasManyAttribute.cs
Outdated
Show resolved
Hide resolved
bart-degreed
commented
Aug 2, 2021
src/JsonApiDotNetCore/Queries/Internal/QueryableBuilding/QueryClauseBuilder.cs
Show resolved
Hide resolved
maurei
approved these changes
Aug 3, 2021
bart-degreed
pushed a commit
that referenced
this pull request
Sep 16, 2021
bart-degreed
pushed a commit
that referenced
this pull request
Sep 16, 2021
bart-degreed
pushed a commit
that referenced
this pull request
Sep 20, 2021
* Removed temporary workaround to start postgres service in cibuild (#1083) * Restored docs for HasManyThrough, which was removed in #1037 (#1084) * Use System.Text.Json (#1075) * Removed Serialization.Client.Internal * Removed undocumented ?nulls and ?defaults query string support * Refactor: use interpolated strings instead of concatenation * Updated tests to use string value for IDs; centralized pseudo-constants * Added tests for pascal casing * Optimized attribute/relationship lookups * Breaking: Made IResourceContextProvider.GetResourceContext() throw when not found; added TryGetResourceContext() that returns null * Optimized resource graph lookups * Breaking: Merged IResourceContextProvider into IResourceGraph * Switched to STJ in assertions Note we need JsonDateTimeOffsetFormatSpecifier now, because STJ never tries to infer the CLR type from JSON values between quotes, while Newtonsoft does. So Newtonsoft would convert both values to date/time, effectively hiding the textual difference that was always there. * Switched to STJ in rendering exception stack traces * Switched to STJ in rendering CLR objects as part of tracing. STJ properly handles self-referencing EF Core objects when enabling reference tracking, as opposed to Newtonsoft. * Switched to STJ in attribute change tracking. This used to take options into account, which is unneeded because we only care about whether there's a diff, not so much what that diff looks like. And we don't expect self-references here (it would have crashed in the past, and will now too). * Switched to STJ in Microservices example * Removed re-indent of response body on HTTP status code mismatch in tests, because we already use indenting in TestableStartup, so this is no longer needed. * Use STJ naming convention on special-cased code paths * Renamed RelationshipEntry to RelationshipObject, Error to ErrorObject * Fix broken test in cibuild * Fixed broken tests in cibuild due to different line endings * Package updates * Refactor serialization objects - Simplified error objects, so they are similar to the other serialization objects. This means no default instances, constructors (exception: ErrorObject) or conditional serialization logic. And explicit names to overrule naming conventions. And annotations to skip serialization when null. - Added missing members from JSON:API v1.1 spec: ErrorDocument.Meta, ErrorLinks.Type, ErrorSource.Header, ResourceIdentifierObject.Meta - Normalized collection types - Updated documentation: Link to v1.1 of JSON:API spec instead of copy/pasted text * Merged ErrorDocument and AtomicOperationsDocument into Document Bugfix: jsonapi/version was missing in error responses * Fill error.source.header where applicable * Breaking: Renamed "total-resources" meta key to "total" because thats what Ember.js expects it to be named (see https://guides.emberjs.com/release/models/handling-metadata/) * Removed unneeded StringEnumConverter usage. Also removed it from the defaults for tests, because that hides the problem when we forget to put it on a member that needs it. * Use configured STJ options for null/default value inclusion Bugfix: do not break out of method on first attribute * Fixed data type in json request body * Added missing type, which is a required element * Converted core code to use System.Text.Json - Added various converters to steer JsonSerializer in the right direction - JsonApiDotNetCore.Serialization.Objects - Removed inheritance in JsonApiDotNetCore.Serialization.Objects, so we're in control of element write order - Moved "meta" to the end in all types (it is secondary information) - Consistently set IgnoreCondition on all properties, so we don't need to override global options anymore * Updated documentation * Fixed broken example-generation. Set launchBrowser to true, so it shows sample data on F5. * Inlined properties on serializable objects * Add test for incompatible ID value. By default, this produces: ``` The JSON value could not be converted to JsonApiDotNetCore.Serialization.Objects.SingleOrManyData`1[JsonApiDotNetCore.Serialization.Objects.ResourceObject]. Path: $.data | LineNumber: 3 | BytePositionInLine: 11. ``` which is totally unhelpful. Because this is so likely to hit users, we special-case here to produce a better error. * Removed misplaced launchsettings.json * Review feedback: use base class instead of static helper * Update ROADMAP.md * Post-merge fixes * Replace NewtonsoftDataContractResolver with JsonSerializerDataContractResolver * Small cleanups Co-authored-by: maurei <maurits.moeys@gmail.com>
bart-degreed
pushed a commit
that referenced
this pull request
Dec 3, 2021
bart-degreed
pushed a commit
that referenced
this pull request
Dec 3, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #935.
QUALITY CHECKLIST