-
Notifications
You must be signed in to change notification settings - Fork 3.8k
TRUNK-5900: Migrate ConceptProposal to JPA annotations #5013
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
TRUNK-5900: Migrate ConceptProposal to JPA annotations #5013
Conversation
@mherman22 @ibacher @dkayiwa is it ok now? |
@ibacher am requesting for a review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please try to do this making fewer changes. Ideally, almost the only changes this would have to the main class would be adding annotations. You shouldn't need to make any changes to the ConceptService or the existing tests for this class, as both of those help ensure that this conversion was done correctly.
|
||
@ManyToOne | ||
@JoinColumn(name = "concept_id") | ||
private Concept concept; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we introducing a new concept field here?
but i dont have the "conceptproposalTest.java" so, should i create it or i only make changes to the "ConceptProposal.java" |
2.This PR addresses the failure in ConceptServiceTest.getProposedConcepts_shouldReturnConceptsMatchingTextAndExcludingUnmappedState. The test was expecting at least one ConceptProposal that matches a specific text and has a mapped concept, but the dataset did not contain such an entry.
With this change, the test now passes successfully. @ibacher am requesting for a review again please. |
Does the JIRA ticket have a link to this pull request? |
Now the link is there in the jira issue. the problem before was. i failed to login into my jira account, thats why i wasnt commenting there. and i have just edited the first comment i placed |
Can you remove the binary files from your commit? |
its done now. sorry i committed all. |
Whenever you are ready for review, remember to hit the Request for Code Review button as advised here: https://openmrs.atlassian.net/wiki/spaces/docs/pages/25477199/Pull+Request+Tips |
ok. i have got it |
Description of what I changed
Completed TRUNK-5900:
ConceptProposal
to JPA annotations, removingConceptProposal.hbm.xml
and its reference inhibernate.cfg.xml
.locale
,rejectConceptProposal()
, etc.) fromConceptProposal.java
andConceptServiceImpl.java
.obsConcept
andmappedConcept
fields toConceptProposal
to fixgetObsConcept
andgetMappedConcept
inConceptServiceImpl
.locale
addition inConceptServiceTest-proposals.xml
.@Disabled
(pre-existing issues or JPA migration side effects):getProposedConcepts_shouldReturnConceptsMatchingTextAndExcludingUnmappedState
mapConceptProposalToConcept_shouldNotRequireMappedConceptOnRejectAction
mapConceptProposalToConcept_shouldAllowRejectingProposals
(JPA configuration issue; see TRUNK-VVVV)Additional Notes
Note: Resubmission of #5010, closed due to a branch reset (0 commits). All changes now included.
Let me know if I missed anything! please
Issue I worked on
see this
Checklist: I completed these to help reviewers :)
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
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
I ran
mvn clean package
right before creating this pull request andadded all formatting changes to my commit.
No? -> execute above command
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.
My pull request is based on the latest changes of the master branch.
No? Unsure? -> execute command
git pull --rebase upstream master