Win a copy of TensorFlow 2.0 in Action this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

is it hql allow insert query

 
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
 
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
 
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.
 
Talk sense to a fool and he calls you foolish. -Euripides A foolish tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic