Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate object mapping for a view or multiple tables instead of a single table ?

 
James Adams
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have only seen examples of mapping Hibernate object properties to database table columns. I want to create a Hiberate object which maps to a View in an Oracle database, or alternately to columns in multiple tables. Is this possible ?

Thanks in advance for any insight, examples, etc.


--James
 
Loren Rosen
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
views: not a problem, though for the typical non-updateable view you will want to mark things as read-only on the Hibernate side.

mapping to multiple tables: not directly possible in Hibernate 2. Usually you can do the mapping some other fairly reasonable way, so it's not a showstopper. I think Hibernate 3 will have more direct support for this kind of mapping.
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic