sentences.rb revision b1771f28608b86404c2decef5afeded1d906dc57
included do
autosave: false,
end
end
# INNER JOINS always return an empty result set if the
# ON clause does not match.
end
if import_links.any?
sentences.each do |sentence|
end
end
end
end
end
end
end
if mappings.any?
else
end
end
# If there are no translations applicable, what do you do?
end
if translations.any? && !overwrite
else
end
end
end
end
def update_or_create_from_hash(hash, timestamp = Time.now)
execute_sql "DELETE FROM entities_sentences WHERE sentence_id=#{e.id}"
execute_sql "INSERT INTO entities_sentences (sentence_id, entity_id, ontology_id)
SELECT #{e.id}, id, ontology_id FROM entities WHERE
ontology_id=#{@association.owner.id} AND text IN (?)",
hash['symbols']
e
end
end
end
end