openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Mutdosch <>
Subject Re: possible to write a JPA Query to that filters both an Entity and its relationship entities?
Date Fri, 23 Feb 2007 22:23:38 GMT
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? 

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

View raw message