You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 3, 2021. It is now read-only.
* Fixes#446
Removes decideRelationTypeDirection as a result of refactoring the decision it was making when filtering the incoming direction of a relationship type. It had an undefined input argument for such cases, so a comparison was failing to ever result in swapping the variables for .from / .to nodes and reversing the relationship direction. This is done due to the use of a more static template once these variables get used to produce Cypher.
Also removes a few unused function arguments
* Adds test for #446 fix
Issue #446 occured when filtering incoming relationships through a relationship type. This case was not tested in the TCK. Only outgoing cases were tested when querying from Person to Company, filtering over the `Person.employmentHistory` field.
So a new test has been added that covers the reverse, querying from Company to Person, filtering over the `Company.employeeHistory` field.
Copy file name to clipboardexpand all lines: test/helpers/tck/filterTck.md
+23-1
Original file line number
Diff line number
Diff line change
@@ -2350,7 +2350,7 @@ MATCH (`person`:`Person`) WHERE (EXISTS((`person`)-[:WORKS_AT]->(:Company)) AND
2350
2350
MATCH (`person`:`Person`) WHERE (`person`.name = $filter.name) AND (EXISTS((`person`)-[:WORKS_AT]->(:Company)) AND ALL(`company` IN [(`person`)-[:WORKS_AT]->(`_company`:Company) | `_company`] WHERE (`company`.name = $filter.company.name))) RETURN `person` { .name ,company: head([(`person`)-[:`WORKS_AT`]->(`person_company`:`Company`) WHERE (`person_company`.name = $1_filter.name) AND (((`person_company`.founded.year = $1_filter.founded.year))) | `person_company` { .name }]) } AS `person`
2351
2351
```
2352
2352
2353
-
### Nested filter on relationship type field
2353
+
### Nested filter on relationship type field (filter outgoing)
2354
2354
2355
2355
```graphql
2356
2356
{
@@ -2374,6 +2374,28 @@ MATCH (`person`:`Person`) WHERE (`person`.name = $filter.name) AND (EXISTS((`per
2374
2374
MATCH (`person`:`Person`) WHERE (`person`.name = $filter.name) RETURN `person` { .name ,employmentHistory: [(`person`)-[`person_employmentHistory_relation`:`WORKED_AT`]->(:`Company`) WHERE (`person_employmentHistory_relation`.role = $1_filter.role) AND (ALL(`person_filter_company` IN [(`person`)-[`person_employmentHistory_relation`]->(`_company`:Company) | `_company`] WHERE (`person_filter_company`.name = $1_filter.Company.name))) | person_employmentHistory_relation {start: { year: `person_employmentHistory_relation`.start.year },Company: head([(:`Person`)-[`person_employmentHistory_relation`]->(`person_employmentHistory_Company`:`Company`) | person_employmentHistory_Company { .name }]) }] } AS `person`
2375
2375
```
2376
2376
2377
+
### Nested filter on relationship type field (filter incoming)
0 commit comments