lib/neo4j/active_node/has_n.rb in neo4j-5.0.12 vs lib/neo4j/active_node/has_n.rb in neo4j-5.0.13

- old
+ new

@@ -69,17 +69,15 @@ QUERY_PROXY_METHODS = [:<<, :delete] CACHED_RESULT_METHODS = [] def method_missing(method_name, *args, &block) target = target_for_missing_method(method_name) + super if target.nil? cache_query_proxy_result if !cached? && !target.is_a?(Neo4j::ActiveNode::Query::QueryProxy) - clear_cache_result if target.is_a?(Neo4j::ActiveNode::Query::QueryProxy) - return if target.nil? - target.public_send(method_name, *args, &block) end private @@ -127,10 +125,10 @@ association_proxy_cache_fetch(hash) do if result_cache = self.instance_variable_get('@source_query_proxy_result_cache') result_by_previous_id = previous_proxy_results_by_previous_id(result_cache, name) result_cache.inject(nil) do |proxy_to_return, object| - proxy = fresh_association_proxy(name, options, result_by_previous_id[object.neo_id]) + proxy = fresh_association_proxy(name, options.merge(start_object: object), result_by_previous_id[object.neo_id]) object.association_proxy_cache[hash] = proxy (self == object ? proxy : proxy_to_return) end