String query ="From transaction JOIN outlet transaction.outlet_ref_id = outlet.outletid WHERE(transaction.added_date_time between'"+sdate+"' and '"+edate+"') and (outlet.merchant ="+merchantId+")";
This is the query I'm using to retrieve data from the data base. This is working when I'm using this query in Navicat and gives data. But I'm using this as a hibernate query it gives following error.