This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate .createSQLQuery(...) mapping

 
Jimmy Clark
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic