-->
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.  [ 5 posts ] 
Author Message
 Post subject: How to write DAO when using Oracle view?
PostPosted: Tue Nov 07, 2006 3:23 am 
Newbie

Joined: Tue Nov 07, 2006 3:04 am
Posts: 4
Hi, guys:
Can any body know how to write the DAO when using Oracle view? I know that when we query the data is easy, but how to update and insert and delete data to the relative table? Overwrite the save() and delete() using hsql? Very appreciate thank you for your advise!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 07, 2006 5:22 am 
Senior
Senior

Joined: Sat Nov 27, 2004 4:13 am
Posts: 137
you can map your classes multiple times using different logical names (in Hibernate 3.2+),
so map it once on table, and once on view....

_________________
don't forget to credit!

Amir Pashazadeh
Payeshgaran MT
پايشگران مديريت طرح
http://www.payeshgaran.co
http://www.payeshgaran.org
http://www.payeshgaran.net


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 07, 2006 8:31 am 
Newbie

Joined: Tue Nov 07, 2006 3:04 am
Posts: 4
pasha wrote:
you can map your classes multiple times using different logical names (in Hibernate 3.2+),
so map it once on table, and once on view....

Thank you for your reply, it's a good idea, but I'm afraid of it made the project more complex. I've modified the DAO class and using the JDBC to control the insert,update and delete, I tested it by invoke the DAO.insert and DAO.update and DAO.delete, no problem in here, I try to invoke it by Session.save(obj), I think it maybe not pass, can anybody give me more information? Thanks again!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 07, 2006 10:57 am 
Newbie

Joined: Thu Nov 02, 2006 8:41 am
Posts: 13
Location: Argentina
why you use Hibernate? to simulate DAO? It seems more difficult, and you are not using all the hibernate power.

I can't understand which is your problem.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 07, 2006 8:08 pm 
Newbie

Joined: Tue Nov 07, 2006 3:04 am
Posts: 4
gromero wrote:
why you use Hibernate? to simulate DAO? It seems more difficult, and you are not using all the hibernate power.

I can't understand which is your problem.

Yes, your right. We are developing the web application, we designed N-tier structure:DB<->DAO<->Logics<->Services<->Web, so we need using DAO to manipulate DB's data, we choice the hibernate to implement the data persistance layer, so we have to simulate DAO.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 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.