saveDoc deletes the primary key from the document passed in
Created by: dmfay
With predictable ramifications if you have an automated system that can execute multiple steps on a document and need to persist it after each one! :)
Should be an easy fix, I'll try to get to it soon.