Hi
Right now I am doing the following in Hql:
String hqlquery ="select ms from ms in class com... where id<? and val=? ";
Object[] param = ...;
Type[] paramTypes = new Type[param.length];
for (int i = 0; i < paramTypes.length; i++) {
paramTypes[i] = Hibernate.STRING;
}
result = sess.find(hqlquery, param, paramTypes);
I need to pass that to sql, so createSQLQuery is my way. But I cannot see how I can use createSQLQuery with ? instead of named parameter, I could not find any example.
Is it possible?
tia
|