File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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 Android Security Essentials Live Lessons this week in the Android 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 ?
 
Similar Threads
Hibernate select columns from multiple tables
Hibernate(newbie) - generating relational database from Object model
Dynamic sql with hibernate
Hibernate best practices
There are difference between a view and a table from the point of view of Hibernate?