-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: HQL update insert
PostPosted: Sat Jun 02, 2007 9:39 pm 
Newbie

Joined: Wed May 23, 2007 12:02 am
Posts: 6
Location: china
Dear All,

can I update or insert useing HQL in hibernate,for example,

String sql=update Bag bag set bag.name=:name where bag.id=id

Query query=Session.createQuery(sql);

query.setParameter("name",name);
query.setParameter("id",id);
query.executeUpdate();

thanks


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jun 03, 2007 11:04 pm 
Senior
Senior

Joined: Sat Aug 19, 2006 6:31 pm
Posts: 139
Yeah...

It's documented here.

http://www.hibernate.org/hib_docs/v3/re ... tch-direct

_________________
Don't forget to rate the reply if it helps..:)

Budyanto


Top
 Profile  
 
 Post subject: Re: HQL update insert
PostPosted: Mon Jun 04, 2007 12:52 am 
Regular
Regular

Joined: Mon Apr 02, 2007 3:54 am
Posts: 67
Location: Hyderabad
So wat prob r u facing in doing the same ?


Top
 Profile  
 
 Post subject: Re: HQL update insert
PostPosted: Mon Jun 04, 2007 12:54 am 
Regular
Regular

Joined: Mon Apr 02, 2007 3:54 am
Posts: 67
Location: Hyderabad
So wat prob r u facing in doing the same ?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.