I have a table Loan application whose pojo is
class LoanApplication{
int id;
int loanNo;
...
}
I have another pojo
class LoanFlow{
int id;
int loanId;
date reviewDate;
...
}
Here loanId of loanFlow is the foreign key mapped to the id of LoanApplication.
I have to fetch all the loan applications with the reviewDate.
I am trying to write a criteria like:
Criteria criteria = getSession().createCriteria(LoanApplication.class);
criteria.add(Restrictions.eq("id", someId));
How can I fetch the reviewDate also from LoanFlow with this criteria.