Skip to content

Commit 0a41deb

Browse files
Merge branch 'rc/5.4.5' into feature/unique_variable_names
2 parents 0712e60 + 7f0d4c5 commit 0a41deb

File tree

6 files changed

+20
-6
lines changed

6 files changed

+20
-6
lines changed

doc/source/configuration.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Adjust driver configuration - these options are only available for this connecti
3232
config.MAX_TRANSACTION_RETRY_TIME = 30.0 # default
3333
config.RESOLVER = None # default
3434
config.TRUST = neo4j.TRUST_SYSTEM_CA_SIGNED_CERTIFICATES # default
35-
config.USER_AGENT = neomodel/v5.4.4 # default
35+
config.USER_AGENT = neomodel/v5.4.5 # default
3636

3737
Setting the database name, if different from the default one::
3838

neomodel/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "5.4.4"
1+
__version__ = "5.4.5"

neomodel/async_/match.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -615,14 +615,16 @@ def build_traversal_from_path(
615615
rhs_label = relationship.definition["node_class"].__label__
616616
if relation.get("relation_filtering"):
617617
rhs_name = rel_ident
618+
rhs_ident = f":{rhs_label}"
618619
else:
619620
if index + 1 == len(parts) and "alias" in relation:
620621
# If an alias is defined, use it to store the last hop in the path
621622
rhs_name = relation["alias"]
622623
else:
623624
rhs_name = f"{rhs_label.lower()}_{rel_iterator}"
624-
rhs_name = self.create_node_identifier(rhs_name, rel_iterator)
625-
rhs_ident = f"{rhs_name}:{rhs_label}"
625+
rhs_name = self.create_node_identifier(rhs_name)
626+
rhs_ident = f"{rhs_name}:{rhs_label}"
627+
626628
if relation["include_in_return"] and not already_present:
627629
self._additional_return(rhs_name)
628630

neomodel/sync_/match.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -613,14 +613,16 @@ def build_traversal_from_path(
613613
rhs_label = relationship.definition["node_class"].__label__
614614
if relation.get("relation_filtering"):
615615
rhs_name = rel_ident
616+
rhs_ident = f":{rhs_label}"
616617
else:
617618
if index + 1 == len(parts) and "alias" in relation:
618619
# If an alias is defined, use it to store the last hop in the path
619620
rhs_name = relation["alias"]
620621
else:
621622
rhs_name = f"{rhs_label.lower()}_{rel_iterator}"
622-
rhs_name = self.create_node_identifier(rhs_name, rel_iterator)
623-
rhs_ident = f"{rhs_name}:{rhs_label}"
623+
rhs_name = self.create_node_identifier(rhs_name)
624+
rhs_ident = f"{rhs_name}:{rhs_label}"
625+
624626
if relation["include_in_return"] and not already_present:
625627
self._additional_return(rhs_name)
626628

test/async_/test_match_api.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -631,6 +631,11 @@ async def test_relation_prop_filtering():
631631
await nescafe.suppliers.connect(supplier2, {"since": datetime(2010, 4, 1, 0, 0)})
632632
await nescafe.species.connect(arabica)
633633

634+
result = await Coffee.nodes.filter(
635+
**{"suppliers|since__gt": datetime(2010, 4, 1, 0, 0)}
636+
).all()
637+
assert len(result) == 1
638+
634639
results = await Supplier.nodes.filter(
635640
**{"coffees__name": "Nescafe", "coffees|since__gt": datetime(2018, 4, 1, 0, 0)}
636641
).all()

test/sync_/test_match_api.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -623,6 +623,11 @@ def test_relation_prop_filtering():
623623
nescafe.suppliers.connect(supplier2, {"since": datetime(2010, 4, 1, 0, 0)})
624624
nescafe.species.connect(arabica)
625625

626+
result = Coffee.nodes.filter(
627+
**{"suppliers|since__gt": datetime(2010, 4, 1, 0, 0)}
628+
).all()
629+
assert len(result) == 1
630+
626631
results = Supplier.nodes.filter(
627632
**{"coffees__name": "Nescafe", "coffees|since__gt": datetime(2018, 4, 1, 0, 0)}
628633
).all()

0 commit comments

Comments
 (0)