posted 14 years ago
i am using Named Query in my Project Like this
Query query = session.getNamedQuery("selectedPortfolioInfo");
query.setInteger(0, portfolioId);
query.setInteger(0, userID);
List getData = query.list();
and *.hbm.xml file entry is like this
<query name="selectedPortfolioInfo">from PfPortfolioInfo Where id.pfpiId=? And id.umulUserId=? </query>
But i am getting Exception
org.hibernate.QueryException: Expected positional parameter count: 2, actual parameters: [1]
Both id.pfpiId And id.umulUserId both are composite key columns in database table
Thanks For help