I have seen some topics discussing protection against SQL-injection by means of named parameters, but how about hibernate statements like
currentSession().update(object);
or
currentSession().save(object)
?
Are these safe? Or is it safer to always use named parameters like
currentSession().createQuery("update Object set field=:field where id=:id").setParameter("field", field).setParameter("id", id).executeUpdate()
?