Moves recently created instances into the instanceStore.
moveCreatedInstanceToInstanceStore( instance )
Checks if an instance has an
id and is in the
newInstanceStore. If so, it adds it into the
instanceStore and removes it from the
A new instances may have been added to the
newInstanceStore if addInstanceReference
is called on is before the instance has been saved. This is done so we can keep track of references for unsaved
instances and update the references to be keyed by
id when one is available. Without this a request for a
currently referenced instance that was just saved for the first time will erroneously result in a new instance.