Uploaded image for project: 'OpenMRS Core'
  1. OpenMRS Core
  2. TRUNK-1993

UUID used by equals and hashCode in OpenmrsObject

    XMLWordPrintable

    Details

    • Complexity:
      Low

      Description

      Most of model classes implement equals and hashCode based on object's id. Following http://onjava.com/pub/a/onjava/2006/09/13/dont-let-hibernate-steal-your-identity.html?page=1 it's discouraged to do so.

      The idea is to use uuids generated at object's creation time instead. A default implementation of equals and hashCode will be provided by BaseOpenmrsObject.

      A follow up discussion: https://groups.google.com/a/openmrs.org/group/dev/browse_thread/thread/41a3521606762047/12e6ab85aee18e72?show_docid=12e6ab85aee18e72

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              raff Rafal Korytkowski
              Reporter:
              raff Rafal Korytkowski
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: