Added dets updating records.
Fix a potential OOM scenario

Instead of potentially loading all of a type into memory, instead update
on the go.