-->
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.  [ 3 posts ] 
Author Message
 Post subject: HQL updates
PostPosted: Mon Mar 21, 2005 10:35 am 
Beginner
Beginner

Joined: Fri Sep 24, 2004 7:15 am
Posts: 40
Has anyone tried to create an HQL update in Hibernate3?

I always get the exception:

org.hibernate.QueryException: query must begin with SELECT or FROM: update

And I create the HQL update like this:

session.createQuery("update MyObject set ......");

What am I doing wrong? Where can I find some examples of HQL update?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 21, 2005 11:37 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Looks like you are using the old query parser.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 08, 2006 5:25 pm 
Regular
Regular

Joined: Sat Jan 07, 2006 8:30 pm
Posts: 68
gavin wrote:
Looks like you are using the old query parser.


What would be the new one then ? I did get the same error with updates and deletes and I had to go back to JDBC temporarely till find a good solution.

Here the thread I've started.

http://forum.hibernate.org/viewtopic.php?p=2284965


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.