-->
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.  [ 6 posts ] 
Author Message
 Post subject: Can't see any difference between HQL and SQL, help?
PostPosted: Tue Jul 20, 2004 3:02 pm 
Newbie

Joined: Mon Jun 21, 2004 3:43 pm
Posts: 19
I couldn't apply the advantge of HQL well, since I can't tell the main difference between HQL and SQL.

In Hibernate, I also can use SQL to query, right? Like this,

Query query = session.createQuery("select from User as user");
Query query = session.createQuery("from User as user"+ " where user.uname like '%A' " );

But what's the good thing of HQL, any example? Thanks a lot.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 20, 2004 3:37 pm 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
read the reference guide please, there are examples

_________________
Anthony,
Get value thanks to your skills: http://www.redhat.com/certification


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 20, 2004 4:22 pm 
Newbie

Joined: Mon Jun 21, 2004 3:43 pm
Posts: 19
Could you show the link? which article? Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 20, 2004 4:22 pm 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
http://www.hibernate.org/hib_docs/refer ... l-examples

_________________
Anthony,
Get value thanks to your skills: http://www.redhat.com/certification


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 20, 2004 5:09 pm 
Newbie

Joined: Mon Jun 21, 2004 3:43 pm
Posts: 19
Thanks! Actually, I would rather see the sample HQL in JAVA. Any good link?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 20, 2004 5:35 pm 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
please please please read the reference guide and read it twice

_________________
Anthony,
Get value thanks to your skills: http://www.redhat.com/certification


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 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.