You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Ted Husted <hu...@apache.org> on 2003/08/07 17:33:32 UTC

Re: Velocity + Database

Tim Colson wrote:
> I've taken another [hack] approach lately and added a
> getViewableHashMap() method to my biz entities. This method places the
> objects data into a flat hashmap for the preso layer. This also enables
> the flattening to Person.AddressStreet, but it breaks down for nested
> collections. Ex. if Person contains a collection of addresses and we
> call Person.getViewableHashmap() -> do we expect the data from just
> Person, or also the list of addresses? And then if an Address contains a
> recursive Person object, we must prevent going infinitely deep.

Which are *exactly* the same sort of problems we have to address with 
ORM packages -- except in the other direction.

So, something I keep thinking about is a tool that worked like the 
Hibernate session but let me map a rich object to a flat transfer 
object, and vice versa. It wouldn't surprise me to find one out there, 
it's just that the Java Universe is *so* huge now =;0)

-Ted.



---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org