<sql-query name="sql">
select :COLUMN_NAME from table.
</sql-query>
I want to set COLUMN_NAME
using
this.sessionFactory.getCurrentSession().getNamedQuery("sql")
.setString("COLUMN_NAME", "id");
I got a wrong result when I use this code (I know where I fail). Is there any way to set COLUMN_NAME
using getNamedQuery()
and setString()
.