I need to perform an insert with hibernate using HQL or SQL or anything that doesn't wait a select statement inside the query String. Just a simple insert like we do with SQL. Its my understanding that we can't use a raw SQL statement in hibernate am i wrong? If i'm, then how can i do it?
I think I am a little confused on the use case. When the transaction is committed hibernate should take care of doing any necessary inserts why would you want to do this? Also when doing something like this the persistence context would not be updated to reflect the results of the operation. You would be in essence by passing hibernates in memory structures, so you would want to be careful doing stuff like this regardless.