lib/assimilate/batch.rb in assimilate-0.3.4 vs lib/assimilate/batch.rb in assimilate-0.3.5
- old
+ new
@@ -18,10 +18,10 @@
@deletes = []
@resolved = false
end
def load_baseline
- stored_records = @catalog.catalog.find(@domainkey => @domain).to_a
+ stored_records = @catalog.catalog.find(@domainkey => @domain, @idfield => {"$exists" => 1}).to_a
@baseline = stored_records.each_with_object({}) do |rec, h|
key = rec[@idfield]
if h.include?(key)
raise Assimilate::CorruptDataError, "Duplicate records for key [#{key}] in #{@domainkey} [#{@domain}]"
end