Query query = session.createQuery("select id.machineid from hibernate.ORMObjects.TerminalMachineMapping m where m.id.terminalid = :terminalid"); query.setParameter("terminalid", "EJD001"); Iterator ite = query.list().iterator(); Iam getting the exception org.hibernate.QueryParameterException: could not locate named parameter [terminalid] at org.hibernate.engine.query.ParameterMetadata.getNamedParameterDescriptor(ParameterMetadata.java:99) at org.hibernate.engine.query.ParameterMetadata.getNamedParameterExpectedType(ParameterMetadata.java:105)
Please let me know where i am making the mistake.
Regards, G.Kalpana
|