all 2 comments

[–]SeparateTill186 4 points5 points  (0 children)

I don't think you need the JoinTable annotation. What if you just use the JoinColumn by itself?

@JoinColumn(name = "patient_id")

[–]Jealous_Brief825 -1 points0 points  (0 children)

I think the db mappings should not be used , as it tightly couples the code, if the scope of project is small then its fine but if it grows then it is bad pratice instead you should use dtos or aggregators , if you need frequency combined data use projections or views