Is Nested Join possible, mapping a POJO to multiple tables.
posted 7 years ago
I am trying to map a POJO LoanSearchDTO.java to multiple tables.
Tables LOAN_ST and LOAN_CONT_ALLTN are associated to table LOAN through ID_LOAN.
Table CASH_CONT is associated to table LOAN_CONT_ALLTN through ID_LOAN_PCH_CONT.
This means tables LOAN and CASH_CONT are associated through table LOAN_CONT_ALLTN
(a kind of transitive association)
I could map all tables to Loan through ID_LOAN using Join, however am struggling to Join CASH_CONT.
Question: how do I specify mapping to CASH_CONT table. I tried Nested Join like below however that does not seem to
This does not work:
<property name="contractNumber" column="ID_LOAN_PCH_CONT" type="long"/>
<property name="contractExpiryDate" column="DT_CONT_EXPTN" type="Date"/>
Is there any other approach?
Would really appreciate any help. Thank You!
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads