def update_from_relation(field_name, related = Ladder::Config.settings[:with_relations])
      objects = send(field_name).to_a

      if related || embedded_relations[field_name]
        # Force autosave of related documents to ensure correct serialization
        methods.select { |i| i[/autosave_documents/] }.each { |m| send m }

        # update inverse relation properties
        relation = relations[field_name]
        objects.each { |object| object.resource.set_value(relation.inverse, rdf_subject) } if relation.inverse
        objects.map(&:update_resource)
      else
        # remove inverse relation properties
        objects.each { |object| resource.delete [object.rdf_subject] }
        objects.map(&:rdf_subject)
      end
    end
def update_from_relation(field_name, related = Ladder::Config.settings[:with_relations])
      objects = send(field_name).to_a

      if related || embedded_relations[field_name]
        # Force autosave of related documents to ensure correct serialization
        methods.select { |i| i[/autosave_documents/] }.each { |m| send m }

        # update inverse relation properties
        relation = relations[field_name]
        objects.each { |object| object.resource.set_value(relation.inverse, rdf_subject) } if relation.inverse
        objects.map(&:update_resource)
      else
        # remove inverse relation properties
        objects.each { |object| resource.delete [object.rdf_subject] }
        objects.map(&:rdf_subject)
      end
    end
Update the delegated ActiveTriples::Resource from a relation

 @param [String] field_name ActiveModel attribute name for the relation
 @param [Boolean] related whether to include related objects
 @return [Enumerable]
 TODO: add/fix tests for this behaviour when true