-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: View mapping
PostPosted: Sat May 08, 2004 11:16 am 
Beginner
Beginner

Joined: Mon Jan 12, 2004 3:39 pm
Posts: 23
Can I map an Oracle View object as a persistent BO with Hibernate?


Top
 Profile  
 
 Post subject:
PostPosted: Sat May 08, 2004 11:23 am 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
no you can't since it won't be persistent.

You can map object to a view but you won't be able to create or modify, just read it.

As in Oracle you can't create a row in a view ...


Top
 Profile  
 
 Post subject:
PostPosted: Sat May 08, 2004 11:34 am 
Beginner
Beginner

Joined: Mon Jan 12, 2004 3:39 pm
Posts: 23
I can map it so I can write my own select with performance improvements and everything.
I just can't update any of its rows.


Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Sat May 08, 2004 11:51 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
You can of course map a class to a view. You can also update and insert the view, as long as it isn't joined (the Oracle rules are more complex). But even then, you may use an INSTEAD OF trigger on the view and write your own insert/update routine.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.