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

Using @JoinColumn instead of @Column with @ManyToOne in BaseOpenmrsData

    Details

    • Complexity:
      Low

      Description

      Please see for solution:
      https://talk.openmrs.org/t/using-joincolumn-instead-of-column-with-manytoone-in-baseopenmrsdata/3150

      This issue was introduced in 1.11.3 and has been affecting all version since. Two modules are affected:
      org.openmrs.BaseOpenmrsData
      org.openmrs.BaseOpenmrsMetadata

      For the following properties, replace @Column with @JoinColumn:
      @ManyToOne(optional = false)
      @Column(name = "creator")
      protected User creator;

      @ManyToOne
      @Column(name = "changed_by")
      private User changedBy;

      @ManyToOne
      @Column(name = "voided_by")
      private User voidedBy;

      This problem causes build failure for the Oauth2 module, if you change the OpenMRS version from 1.11.1 to 1.11.3 or greater.
      https://github.com/maany/openmrs-module-oauth2-prototype/tree/oauth2-openmrs-1.11.x

        Gliffy Diagrams

          Attachments

            Attachments-Category-Modification

              Activity

                People

                • Assignee:
                  ivange94 Ivange Larry Ndumbe
                  Reporter:
                  sdowlati saadat dowlati
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: