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


Reply via email to