OpenMRS version used for Bahmni missing @JoinColumn fix in OpenMRS 1.11.x

This problem has been fixed in OpenMRS 1.11.x, but not in Bahmni 1.12.x. Here’s the reference:

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

I need this issue to be fixed in order for OAuth2 module to work in Bahmni. I’m new to Bahmni and not sure how one brings over a fix from OpenMRS to Bahmni. Please advise. Thanks.

Actually I believe that this bug has not been fixed in OpenMRS. Looking at both the master branch and 1.11.x branches of openmrs-core, the code still looks like the incorrect version that @maany mentions in the thread you linked to. (@maany, was some other fix put in place instead, or did this go anywhere?)

@sdowlati, to clarify, there is nothing called “OpenMRS 1.11.x” and “Bahmni 1.12.x”. There are multiple release lines of the OpenMRS Platform, e.g. there is “OpenMRS Platform 1.11.x” and “OpenMRS Platform 1.12.x”. (The Bahmni team is building this last one, and the Bahmni distribution uses this.)

Are you a developer? If you so, the way to get this fixed in Bahmni is to fix it in the master branch of openmrs-core, and the fix will be backported to the OpenMRS version that Bahmni is using.

I successfully built Oauth2 module against OpenMRS 1.11.1, but it fails when building it against 1.12.0-SNAPSHOT (Bahmni OpenMRS version) due to use of @Column with @ManyToOne. I didn’t download the source code for either verion of OpenMRS, so you may very well be right that it hasn’t been fixed. If that’s the case, then, I’m wondering why Oauth2 module fails complaining about the use of @Column with @ManyToOne, when changing the OpenMRS version to 1.12.0-SNAPSHOT in the pom file… Here’s the codebase that I’m using for Oauth2: Note: when I download a source zip file, it ususlly downloads as 1.12.x or 1.11.x (e…g, I hope this answers your questions. I appreciate your response.

@sdowlati, I looked into this a bit more and I understand what’s going on.

The work was done at:

…and it wasn’t added to the 1.11.x line until Platform 1.11.3. However you built against 1.11.1, before these annotations were added. It’s not that this was fixed in 1.11.x, rather it’s not broken until 1.11.3. And if you build against 1.11.6-SNAPSHOT you’ll see the same failure you see against 1.12.0-SNAPSHOT.

So, we need to fix this problem in openmrs-core.

What you should do is go to and create a new Bug in the TRUNK (OpenMRS Core) project, with the details that @maany gave in the other thread that you linked to.

Then, if you’re a developer, you can make the fixes yourself. Otherwise you’ll need to get someone from the OpenMRS community to do this. (And you can look for them on the OpenMRS IRC channel.