[jboss-user] [EJB 3.0] - Re: Detach entities - Obtaining a clear pojo
ALRubinger
do-not-reply at jboss.com
Mon Sep 4 22:07:59 EDT 2006
OK; cool.
Would a function that does the following meet your objectives?
* Obtain all internal members of the POJO via reflection/BeanUtils
* Iterate through 'em
* If the current is of type java.lang.Collection, run my above method on it (which replaces any Hibernate Collections with a standard Java Collection)
* Return the original POJO
...?
It's kinda been on my to-do list to create the above as a util for my company, but because it seems hacky and "against the Hibernate" way, I've gone back and forth as to whether it's good design. It does, however, immediately seem to solve many problems with sending a entity to a remote client. Like a "cleanser." Thoughts/Opinions?
S,
ALR
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3969341#3969341
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3969341
More information about the jboss-user
mailing list