Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Object Relational Mapping
Search Coderanch
Advance search
Google search
Register / Login
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
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Tim Cooke
paul wheaton
Ron McLeod
Jeanne Boyarsky
Sheriffs:
Paul Clapham
Saloon Keepers:
Tim Holloway
Roland Mueller
Bartenders:
Forum:
Object Relational Mapping
A query with HQL
Ravi Kiran Va
Ranch Hand
Posts: 2234
I like...
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi ,
I am praticing Hibernate HQL through Eclipse HQL Editor .
Could anybody please let me know why the FIrst Statement is executed while the second throws an Error .
select NAME , PASSWORD from Users
1st query
select * from Users
2nd query
Please suggest . Thank
Save India From Corruption - Anna Hazare.
Paul Sturrock
Bartender
Posts: 10336
I like...
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Impossible to say without knowing what error is thrown. Both look OK (though the property names in the first look a bit suspect for a
Java
class).
JavaRanch FAQ
HowToAskQuestionsOnJavaRanch
Ravi Kiran Va
Ranch Hand
Posts: 2234
I like...
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Thanks Paul ,
You were correct that without seeing the POJO types we cant say whats the problem in case of writing HQL .
Assume taht this is my code inside a Java Object .
@Namedquery(name="myquery" query="select ename from emp") Query query = session.getNamedQuery("myquery");
I just want to ask that , is it possbile to use normal SQL queries within @Namedquery , or should it be HQL queries only
Please advice , thanks .
Save India From Corruption - Anna Hazare.
A sonic boom would certainly ruin a giant souffle. But this tiny ad would protect it:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Left join using on keyword (Hibernate)
Stored Procedure inside HQL query?
Hibernate Doubt in HQL
How to select all datas from DB using HQL
retrive data
More...