agreed, the relationships (like most things) could get u into performance trouble. we deal with this by making relationships one-directional where possible and there is also the lazy loading option.
i find having the relationships in the DTOs useful as it enables the DTOs to be the *real* data model, rather than the database. for me, it is easier to model a business problem as an object model rather than a relational model as u get easy inheritence, etc. for us this translates to much more agile development/maintenance process. of course u get back to the old trade-off of convenience/speed vs performance. brad > -----Original Message----- > From: Donnie Hale [mailto:[EMAIL PROTECTED] > Sent: Wednesday, 17 April 2002 11:09 AM > To: Brad Clow > Subject: RE: [Hibernate-devel] SQL Server 2000 questions > > > See below. > > > > > we use a layered approach similar to the one u have > outlined. i have > > not found that hibernate is more aligned with putting data > directly into > > the BOs (using terminology below here). the way we have > approached the > > architecture is: > > > > DAOs: a mixture of hibernate itself and our own classes > (that contain > > the queries, so they are not spread all over the application). > > DTOs: classes that hibernate maps to > > BOs: stateless session ejbs (or just normal classes) that expose the > > functions/services of the application. > > > > in our case i c hibernate aligned more with the DTOs. > > > > As far as setters/getters go, I agree. But Hibernate expects the > relationship stuff (so far as I can tell) to be in the same > class w/ the > basic column properties. So now a DTO has references to > things all over the > place (potentially). At that point, using the DTO as a > mechanism to transfer > data between layers / "over-the-wire" becomes difficult or at least > potentially more expensive than one may want. > > I appreciate all the give-and-take in this thread... > > Donnie > > _______________________________________________ Hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel