openmrs-core
openmrs-core copied to clipboard
TRUNK-5903: Switching from hibernate mappings to annotations-Role
Description of what I changed
-
I have changed the role domain from using hibernate xml mappings to annotations.
-
Also ensured the role class extends the extends BaseOpenmrsObject but also implements the retireable and Auditable interfaces.
-
I made the name attribute transient so that it doesn't get persisted.
Issue I worked on
see https://issues.openmrs.org/browse/TRUNK-5903
Checklist: I completed these to help reviewers :)
-
[x] My IDE is configured to follow the code style of this project.
No? Unsure? -> configure your IDE, format the code and add the changes with
git add . && git commit --amend
-
[x] I have added tests to cover my changes. (If you refactored existing code that was well tested you do not have to add tests)
No? -> write tests and add them to this commit
git add . && git commit --amend
-
[x] I ran
mvn clean package
right before creating this pull request and added all formatting changes to my commit.No? -> execute above command
-
[x] All new and existing tests passed.
No? -> figure out why and add the fix to your commit. It is your responsibility to make sure your code works.
-
[x] My pull request is based on the latest changes of the master branch.
No? Unsure? -> execute command
git pull --rebase upstream master
@mherman22 Got some failing tests at
Error: Tests run: 29, Failures: 0, Errors: 1, Skipped: 2, Time elapsed: 2.353 s <<< FAILURE! - in org.openmrs.hl7.HL7ServiceTest
Error: org.openmrs.hl7.HL7ServiceTest.resolveUserId_shouldReturnNullForAmbiguousUsersUsingFirstAndLastNameGivenUserIDIsNull Time elapsed: 0.06 s <<< ERROR!
@mherman22 Got some failing tests at
Error: Tests run: 29, Failures: 0, Errors: 1, Skipped: 2, Time elapsed: 2.353 s <<< FAILURE! - in org.openmrs.hl7.HL7ServiceTest
Error: org.openmrs.hl7.HL7ServiceTest.resolveUserId_shouldReturnNullForAmbiguousUsersUsingFirstAndLastNameGivenUserIDIsNull Time elapsed: 0.06 s <<< ERROR!
@tendomart i am looking into that. Feel free to read through this talk post though -> https://talk.openmrs.org/t/switching-from-xml-mappings-to-annotations/39277/1
Error: VisitValidatorTest.validate_shouldFailIfTheStartDatetimeIsAfterAnyEncounter » StackOverflow
Error: VisitValidatorTest.validate_shouldFailIfTheStopDatetimeIsBeforeAnyEncounter » StackOverflow
Error: VisitValidatorTest.validate_shouldFailIfTheStartDatetimeIsAfterAnyEncounter » StackOverflow Error: VisitValidatorTest.validate_shouldFailIfTheStopDatetimeIsBeforeAnyEncounter » StackOverflow
looks to be a failure on the entire core as of this commit --> https://github.com/openmrs/openmrs-core/commit/7e9a3b692d4b913e6c028791bf803b96af59651e
It's a flaky test... Or at least, the commit you point to only updates the README.md file, so I'm not certain how that could change test results.
It's a flaky test... Or at least, the commit you point to only updates the README.md file, so I'm not certain how that could change test results.
This test passes when i build locally.
@dkayiwa @ibacher am pinging you on this
@mherman22 did you see the merge conflicts?