File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Application Frameworks and the fly likes Hibernate .createSQLQuery(...) mapping Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Hibernate .createSQLQuery(...) mapping" Watch "Hibernate .createSQLQuery(...) mapping" New topic
Author

Hibernate .createSQLQuery(...) mapping

Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
Hi,

Is it possible to map a class to the results of a SQL query instead of an actual table? This would be used for creating objects from data already in the database, not saving data to the database.

Say we have a query that pulls data from two tables.



Can we map this to the class below and populate the objects with the createSQLQuery(...) method?



Something like


[ August 09, 2008: Message edited by: James Clark ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Hibernate .createSQLQuery(...) mapping
 
Similar Threads
Hibernate: Getting time/date in simple sql queries
Hibernate/Spring/Oracle: Problem acessing objects from a query
java.lang.IllegalArgumentException: Parameter UserName does not exist
HibernateException: No Hibernate Session bound to thread
Issue in Model design