-->
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: Persistent class and DTO
PostPosted: Fri Oct 31, 2003 12:42 am 
Newbie

Joined: Wed Oct 29, 2003 10:15 am
Posts: 4
Hi all,

I am new to Hibernate, one question arises here, is there any recommended way to deal with DTO pattern with Hibernate? Seems Hibernate persistent class simply can act as DTO, may I just use Hibernate persistent class as DTO to transfer data between tiers, or do I have to code DTO separately?

Thank you.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 31, 2003 3:57 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Have a look at [CENSORED]

To be short, you can avoid extra DTO classes.

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 31, 2003 4:04 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Sorry .... this is not really "released" yet. I accidently left a wiki page that I was working on public.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 31, 2003 4:51 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
I do not une DTO unless I really need them. I hate write DTO and binding mecanism, just to allow pure layer separation.

I let my persistance classes transfering data to presentation layer.

Main drawback is when presentation layer try to get uninitialized collection or object (Which should not happen by contract), A LazyInitializationExeception is thrown because I closed session int he business tier.

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 31, 2003 11:22 pm 
Newbie

Joined: Wed Oct 29, 2003 10:15 am
Posts: 4
epbernard wrote:
Have a look at [CENSORED]

To be short, you can avoid extra DTO classes.


Thank you, but could you tell me where you want me to look at?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 01, 2003 1:58 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
As Gavin said, the document I refered to was working stage and has been accidently released public. Gavin removed it and removed the link I gave to you.

_________________
Emmanuel


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.