Win a copy of Functional Reactive Programming this week in the Other Languages 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