Recompute entity changeset to allow updating of a document

This PR fixes issue #1.

I will try to improve this further so it only updates the field if it actually changed (right now it update the entity if you set the document whether it’s the same one or a new one).