hi my tables are as follows:
1- medical_company:
For those who ran into this problem and are using globally_quoted_identifiers, this helped me:
Change
@JoinColumns({
@JoinColumn(name = "new_col_1", referencedColumnName = "ref_col_1"),
@JoinColumn(name = "new_col_2", referencedColumnName = "ref_col_2")
})
To
@JoinColumns({
@JoinColumn(name = "new_col_1", referencedColumnName = "`ref_col_1`"),
@JoinColumn(name = "new_col_2", referencedColumnName = "`ref_col_2`")
})
Notice the backtick wrapping the referencedColumnName value.