?
Solved

from clause in Hibernate

Posted on 2010-11-11
2
Medium Priority
?
376 Views
Last Modified: 2012-05-10
What should I use within the from clause of the Hibernate(HQL).

Is it the name of the table or the name of the class.

Suppose if we have a table with name "Employee" and it's corresponding mapping class "Person"

so should we say it as "from Employee" or "from Person" in order to get all the details.
0
Comment
Question by:shragi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 58

Accepted Solution

by:
cyberkiwi earned 200 total points
ID: 34118683
You use the class name, Employee
0
 
LVL 58

Assisted Solution

by:cyberkiwi
cyberkiwi earned 200 total points
ID: 34118692
Your class name is Person, sorry, it is "from Person"

http://docs.jboss.org/hibernate/core/3.3/reference/en/html/queryhql.html#queryhql-from

This returns all instances of the class eg.Cat.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What do responsible coders do? They don't take detrimental shortcuts. They do take reasonable security precautions, create important automation, implement sufficient logging, fix things they break, and care about users.
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question