Skip to content

Commit

Permalink
Add partial patch (breaks other behavior)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Johnson committed Jul 9, 2015
1 parent 8379b71 commit c16eedd
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/active_triples/relation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,9 @@ def value_to_node(val)

def add_child_node(resource,object=nil)
parent.insert [rdf_subject, predicate, resource.rdf_subject]
unless resource.frozen?
resource.set_persistence_strategy(ParentStrategy)
resource.parent = parent
end
resource.parent = parent if
resource.persistence_strategy.is_a?(ParentStrategy) &&!resource.frozen?

self.node_cache[resource.rdf_subject] = (object ? object : resource)
resource.persist! if resource.persistence_strategy.is_a? ParentStrategy
end
Expand Down

0 comments on commit c16eedd

Please sign in to comment.