Set the OID target of a reference.
The reference must be a direct reference, otherwise this method will fail.
The reference will be automatically updated in memory and on disk.
The reference
The new target OID for the reference
0 or an error code