Hi am trying to join the tables with specific condition and when i executing the below query and am getting the below error
org.hibernate.QueryException: unexpected token: WITH [
my HQL QUERY is below...
> List results1=session.createQuery("select financialDetail from
> FinancialDetail financialDetail " +
> "left join financialDetail.financialClaimHeaderInfo fhdrinfo WITH (fhdrinfo.chk='224') "+
> " where financialDetail.fc=:fc")
> .setParameter("fc",fc)
> .list();
In the financialDetail.hbm file i have a mapping between these two table like
<set name="financialClaimHeaderInfo" table="F_CLM_HDR_TB" lazy="true" inverse="true" cascade="all" > <key column="F_FCN_NUM" /> <one-to-many class="com.FinancialClaimHeaderInfo"/> </set>
Pls guide me what is wrong here...