I am using Hibernate in my project and there is a certain scenario where I want to use the uniqueResult() method on the org.hibernate.SQLQuery class to perform native SQL INSERT and UPDATE operations.
I did try using the executeUpdate() method on the same class. But I get an error saying that they are used for HQL updates only.
Please advice if this is effective and reliable way of ensuring data being saved/updated in the database.