> is this (using separate DTOs) the common practice to handle the > scenario where your view differs from your entity model?
Yes. Without decent ORM, you always have to create a DTO model. With decent ORM, you have the option of making your DTO model and your persistent domain model the same actual classes. This is useful from a productivity standpoint, but can quickly break down in situations like this. SDO is a bit different than JPA / ORM, since it is really addressing the problem of data transfer. So it includes a few concepts that aren't directly covered in strict ORM. -Patrick -- Patrick Linskey BEA Systems, Inc. _______________________________________________________________________ Notice: This email message, together with any attachments, may contain information of BEA Systems, Inc., its subsidiaries and affiliated entities, that may be confidential, proprietary, copyrighted and/or legally privileged, and is intended solely for the use of the individual or entity named in this message. If you are not the intended recipient, and have received this message in error, please immediately return this by email and then delete it. > -----Original Message----- > From: Tom Mutdosch [mailto:[EMAIL PROTECTED] > Sent: Friday, February 23, 2007 2:24 PM > To: open-jpa-dev@incubator.apache.org > Subject: Re: possible to write a JPA Query to that filters > both an Entity and its relationship entities? > > True. In this case, I guess I'd rather lean towards the side > of "best > practice". It sounds like in your estimation (and I see > there are tons > of discussions about this after doing a quick search) that > would be to > keep this separated into another type of wrapper object and keep my > Entities pure. That sounds reasonable. > > I don't come from a Hibernate background, but is this (using separate > DTOs) the common practice to handle the scenario where your > view differs > from your entity model? > Thanks, > Tom > > Patrick Linskey wrote: > > You could do that, but personally, I tend to be wary of > putting computed > > data into the entity types themselves. You're in the grey > area in the > > question of when to use your domain model as a DTO graph > vs. creating a > > separate set of DTOs. > > > > -Patrick > > > > > >