-
Notifications
You must be signed in to change notification settings - Fork 213
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
fix(mongo): disallow filtered nested disconnect based on inlining #4008
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a question on test coverage, otherwise this looks good based on the issue description. Good job!
enumflags2::make_bitflags!(ConnectorCapability::{#(#required_capabilities|)*}), | ||
enumflags2::make_bitflags!(ConnectorCapability::{#(#required_capabilities)|*}), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How was this even compiling before?
if ctx.has_capability(ConnectorCapability::FilteredInlineChildNestedToOneDisconnect) | ||
// If the disconnect happens on the inline side, then we can allow filters | ||
|| parent_field.related_field().is_inlined_on_enclosing_model() | ||
{ | ||
types.push(InputType::object(filter_objects::where_object_type( | ||
ctx, | ||
&parent_field.related_model(), | ||
))); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have any other test that actually performs the disconnect when there is no need to join on a foreign collection?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. The relation link tests that I have modified are inlining the relation on both sides (they generate a bunch of different datamodels)
f8a5c40
to
778dee5
Compare
CodSpeed Performance ReportMerging #4008 Summary
|
* origin/main: qe: fix regression on CreateOne data argument nullability (#4011) fix(mongo): disallow filtered nested disconnect based on inlining (#4008) nix: make quaint/shell.nix work on darwin (#4013) qe: cache resolved QuerySchema input & output object fields (#4009) Optimized dual uploads from engineer (#3981) qe: remove XML scalar type (#3957) qe: make schema building lazy (#3977) introspection: fix reintrospection of @default(uuid()) @db.Uuid (#4004) build(deps): bump h2 from 0.3.15 to 0.3.17 (#3872)
Overview
fixes prisma/prisma#16869 (BREAKING)
Please read the issue above to understand the root problem.
Note: We could perform a separate read and then perform the update based on the found ids. Not sure it's worth adding complexity to the graph before we have demand.