aspose file tools*
The moose likes Object Relational Mapping and the fly likes Hibernate object mapping for a view or multiple tables instead of a single table ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hibernate object mapping for a view or multiple tables instead of a single table ?" Watch "Hibernate object mapping for a view or multiple tables instead of a single table ?" New topic
Author

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

James Adams
Ranch Hand

Joined: Sep 12, 2003
Posts: 188
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

Joined: Feb 12, 2003
Posts: 156
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Hibernate object mapping for a view or multiple tables instead of a single table ?