-
-
Notifications
You must be signed in to change notification settings - Fork 116
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
ensure the LEFT JOIN behaves as expected #623
base: main
Are you sure you want to change the base?
Conversation
The WHERE clause will filter out these rows because NULL values do not satisfy either the IS NULL or the greater than conditions, effectively excluding them from the result set. Turning the LEFT JOIN into an INNER JOIN for rows where NULL values would have been expected. * move includeDeleted checks from query to join, where the filter will be applied * copy filters over and add filter as necessary, on case deleted in not included * keep includeDeleted checks within query aswell, as null checks now can exists in where clause aswell. * adjust tests to reflect changes in code.
remove conformity to equatable for query action
…L optimization incorporate changes in test cases
7c4f2c7
to
88fbec7
Compare
33236f1
to
983cd12
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #623 +/- ##
==========================================
+ Coverage 24.28% 24.48% +0.19%
==========================================
Files 149 149
Lines 9349 9375 +26
==========================================
+ Hits 2270 2295 +25
- Misses 7079 7080 +1
|
It appears that the Mongo driver (or Mongo itself) can't handle this. @Joannis, can you provide any insight? |
|
||
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.
Excess whitespace change, please remove
support for complex joins with filters is not implemented yet. joins with filter would require a pipeline as in the following example db.orders.aggregate([
{ $lookup: {
from: "customers",
let: {
orderId: "$customerId",
orderDate: "$orderDate"
},
pipeline: [
{ $match: {
$expr: {
$and: [
{ $eq: ["$_id", "$$orderId"] },
{ $gt: ["$memberSince", "$$orderDate"] },
{ $eq: ["$isVerified", true] }
]
}
}}
],
as: "customerInfo"
}}
])
|
* Add missing targets to api-docs.yml * Add missing targets to pathsToInvalidate
…or#628) The CompositeIDProperty was force-unwrapping its value during database input, which would crash if the value was nil. This could happen during initial inserts where the composite ID is meant to be set by a database trigger. Now checks if value exists before attempting to input it.
A solution for the Mongo driver is being worked on (though not by me, as I neither have nor want any knowledge of Mongo 😅) |
The WHERE clause will filter out these rows because NULL values do not satisfy either the IS NULL or the greater than conditions, effectively excluding them from the result set.
Turning the LEFT JOIN into an INNER JOIN for rows where NULL values would have been expected.