lib/mongo_adapter/query.rb in dm-mongo-adapter-0.2.0.pre1 vs lib/mongo_adapter/query.rb in dm-mongo-adapter-0.2.0.pre2

- old
+ new

@@ -147,10 +147,10 @@ # TODO: document # @api private def comparison_statement_for_embedment(comparison, affirmative = true) embedment = @query.model.embedments.values.detect { |e| e.target_model == comparison.subject.model } - field = "#{embedment.name}.#{comparison.subject.field}" + field = "#{embedment.storage_name}.#{comparison.subject.field}" update_statements(comparison, field, affirmative) end # Takes a Comparison condition and returns a Mongo-compatible hash