How to do mapping in JPA when a table has a column that references 2 other table columns
posted 3 years ago
I am having a table A with following structure:
In Column a1b1 of Table C we are storing the values from PK Column a1 from table A or PK Column b1 from Table B. i.e, some rows in Table C relates to Table A and some relates to Table B depending on this Column "a1b1" column value. Please help me in doing the mapping for this case in JPA Annotations.