-
Notifications
You must be signed in to change notification settings - Fork 206
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
Add bidirectional association for patients in person mapping #1083
Conversation
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.
A few questions for @rahul6603:
How does this work with the Provider
class? I see that the Person
class does include a Set
for holding Patients (which should be Set<Patient>
instead of just Set
as it is now), but the Person
object is also used by the Provider
class. Does this class need to get a mapping like this for Provider
as will, and does adding the mapping cause either class to be unhappy?
Does saving logic need to be reviewed and changed? Will saving a Person
with an empty Set<Patient>
, then adding the Person
to the Patient
, and saving the Patient
(without adding the Set<Patient>
to the Person
) allow entities to be saved properly? Does the bi-directionality demand that the Patient
be added into the Person
object's Set<Patient>
as well?
Are there integration or unit tests to test these cases? There are a few classes with methods that call the insert, save, and/or update on these objects that I'm unsure of how they'll handle the change ex persistPatientData
in PatientManagementUpdate.java
Hi @CalebSLane, thanks for the review!
Please let me know if you can think of any side effects this change might cause. |
Hi @mozzy11 and @CalebSLane, could you please review this PR? |
👋 Hi, @rahul6603, This message is automatically generated by prince-chrismc/label-merge-conflicts-action so don't hesitate to report issues/improvements there. |
Thanks @rahul6603 . |
@CalebSLane , In theory , no change is needed in the saving Logic and neither for the Provider Class. |
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.
see above comment
…-Global-2 into bidirectional
…-Global-2 into bidirectional
Issue - #1049
Summary
<set>
element to Person mapping to establish bidirectional association with Patient.@IndexedEmbedded
with a unidirectional association. We will be using@IndexedEmbedded
to embed the fields of Person object in the main Patient object.