-->
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 Help with SELECT and DELETE
PostPosted: Thu Jan 29, 2004 4:17 pm 
Beginner
Beginner

Joined: Mon Dec 01, 2003 8:48 pm
Posts: 47
Location: Texas, United States
I have read through the documentation and posts, and I can't find what I need.

I would like to execute SELECT * FROM table_name and DELETE FROM table_name. I have tried the following:

find("SELECT * FROM table_name");
delete("SELECT * FROM table_name");

Can someone tell me what the equivalent HQL statements are?

Thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 29, 2004 5:22 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
session.find("from MappedClass");
session.delete("from MappedClass");

This is really so basic, you should find this in pretty much every tutorial and the docs.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 29, 2004 6:19 pm 
Beginner
Beginner

Joined: Mon Dec 01, 2003 8:48 pm
Posts: 47
Location: Texas, United States
That worked great! Thank you!


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.