Use Version-Aware References

Oracle recommends the use of version aware references wherever feasible to avoid issues associated with version agnostic references.

Oracle Healthcare Data Repository lets you update existing objects without prior retrieval if the object id is known. HDR can also create an object if it does not exist, or do nothing or update it if it does. While useful, careless use of these features may result in corrupt data, and technology limitations may cause further unexpected errors. These concepts also apply to messaging side effects because they use version agnostic references internally.

References are created by the makeReference method of the Resource, Role to Actor, Role, and Entity factories. References may be version aware or version agnostic. Version aware references are created by specifying the version number of the object being referenced when creating the reference, and only apply the updates to the version of the object specified. If that version is not the latest one an error occurs. Version agnostic references have no version specified and thus always apply to the latest version of the object, but note that there are problems in HDR with the implementation of version agnostic references.