Hibernate / Hibernate interview questions II
How to prevent SQL Injection in hibernate?
Use named parameters in queries to avoid sql injection.
Query query= sessionFactory.getCurrentSession().createQuery("from UserInfo where userName=:userName"); query.setParameter("username", userName);
More Related questions...