• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

is it hql allow insert query

 
Shinu Pil
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
i would like to insert into table using HQL query.I searched lot of net...but allinsert query are reference to another tavles
i would like to kno wwhat is hql query for

your help really appreciated
 
Hebert Coelho
Ranch Hand
Posts: 754
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
SHINU SHINU.R wrote:Hi
i would like to insert into table using HQL query.I searched lot of net...but allinsert query are reference to another tavles
i would like to kno wwhat is hql query for

your help really appreciated
I do not think this is possible.
You should use NativeQuery instead. This post shows how to use NativeQueries: http://uaihebert.com/?p=1274
 
Alberto Ivo
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Shinu,

Look this tutorial: http://www.mkyong.com/hibernate/hibernate-query-examples-hql/

This sentence you are trying to do is native sql. Hibernate has his own sentence but very similar.

But why don't you use the insert method? Just populate your object and it's done.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic