-->
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.  [ 6 posts ] 
Author Message
 Post subject: Hibernate and business Objects
PostPosted: Tue Dec 02, 2003 12:25 pm 
Beginner
Beginner

Joined: Thu Oct 02, 2003 8:02 am
Posts: 45
I'm writing a web application. I deal with a lot of objects as users, events, orders, customers and so on. These objects act as business objects ( they handle the state of the application). So, many of them must be persistent ( MySQL DB). So i would like to use Hibernate as O/R mapping layer.
My question is : is it a good way to make persistent my business objects ?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 02, 2003 1:16 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
yes ;-)

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 02, 2003 1:17 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
To be more specific, Hibernate is done for that.

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 03, 2003 12:46 pm 
Beginner
Beginner

Joined: Thu Oct 02, 2003 8:02 am
Posts: 45
So if i want to use DTO Objects, do i have to use my business objects to do so or do i have to create objects that will be similar to my BO.
In fact, if i use a set method on a BO which is persistent, for example, in a servlet, i have an error because no session in opened.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 03, 2003 7:29 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
Normal approach is to use the business object (domain object) as your DTO. You just have to make sure when you dealing with the persistence layer you have an active transaction and session. There is lots of information on the wiki, FAQs, manuals and the forums. Take the time to do some research.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 03, 2003 11:17 pm 
Regular
Regular

Joined: Fri Sep 05, 2003 12:01 am
Posts: 80
Location: Bogot
this thread might be of some help:

http://forum.hibernate.org/viewtopic.php?t=925766

_________________
Mauricio Hern


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