lib/mongoo/identity_map.rb in mongoo-0.3.1 vs lib/mongoo/identity_map.rb in mongoo-0.4.0
- old
+ new
@@ -46,10 +46,10 @@
end
end
end
def write(doc)
- if store
+ if store && !store.has_key?(doc.id.to_s)
store[doc.id.to_s] = doc
end
end
def flush!
\ No newline at end of file