I am using the createSQL()
method in Hibernate to perform an insert operation on my database.
What I want to do is to describe a custom SQL statement so that I can apply the MD5()
function to a field in a table. Therefore, I cannot just use the save(Object)
method.
I got a warning from the Eclipse IDE that says: The method createSQLQuery(String) from the type QueryProducer is deprecated.
Despite this, the insert operation is performed as expected.
The current version of Hibernate that I use in my project is 5.2.5.Final.
So the question will be: is there any other way to achieve the same in this version of Hibernate in order to get rid of this annoying warning?
I also know that adding @SuppressWarnings("deprecation")
annotation will solve the problem, but I'm not sure if it will cause any problems in the future.
It is worth noting that I am starting to use this framework.
source share