lib/active_graph/relationship/query.rb in activegraph-10.0.0.pre.beta.5 vs lib/active_graph/relationship/query.rb in activegraph-10.0.0.pre.beta.6
- old
+ new
@@ -15,10 +15,10 @@
# Loads the relationship using its neo_id.
def find_by_id(key)
query = ActiveGraph::Base.new_query
result = query.match('()-[r]-()').where('ID(r)' => key.to_i).limit(1).return(:r).first
fail RecordNotFound.new("Couldn't find #{name} with 'id'=#{key.inspect}", name, key) if result.blank?
- result.r
+ result[:r]
end
# Performs a very basic match on the relationship.
# This is not executed lazily, it will immediately return matching objects.
# To use a string, prefix the property with "r1"