xxxx wrote:
hi ,
i wanna insert a record using named queries is there any way to do this ?
i tried to insert but its giving me some excep.
how to execute the query ?
can anyone give me sample code to do this..
thanks & regards,
vinay
Queries, named or otherwise, are for Quering data - i.e. returning lists of resulting objects.
Inserts and Updates are handled for you. Populate an object, begin a transaction, session.save(obj) or session.update(obj), tx.commit();
There are plenty of examples of this in the docs.