Skip to content

Commit

Permalink
find by id of relationship uses relationship type now and leverages i…
Browse files Browse the repository at this point in the history
…ndex
  • Loading branch information
klobuczek committed Jan 15, 2024
1 parent edf3eda commit 79cde6e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/active_graph/relationship/query.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def find(id)
# Loads the relationship using its neo_id.
def find_by_id(key)
query = ActiveGraph::Base.new_query
result = query.match('()-[r]-()').where("r.#{id_property_name}" => key).limit(1).return(:r).first
result = query.match("()-[r:`#{mapped_element_name}`]-()").where("r.#{id_property_name}" => key).limit(1).return(:r).first
result&.send(:[], :r)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/active_graph/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module ActiveGraph
VERSION = '12.0.0.beta.2'
VERSION = '12.0.0.beta.3'
end

0 comments on commit 79cde6e

Please sign in to comment.