[beanutils] Usage of copyProperties on Beans with Parent Child relationship

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[beanutils] Usage of copyProperties on Beans with Parent Child relationship

wegwerfname-mathe
Hi there BeanUtils List,

i currently try to get my head around an implementation and am a bit lost.

I modeled the database side of my Applications with JPA Entities in a
Parent / Child relationship. This relationship is bi-directional. The
parent holds a List of child Objects and the child Objects have a
Reference to their parent Object.

The second side is the the DTO Object side which follows basically the
same Model but instead of JPA Entities now the Objects represent Pojo`s
which get serialized and transferred over the Net.

I tried to use BeanUtils.copyProperties to Map between those two sides
but am lost on how to handle the whole Parent / Child relationship Part
which, right now, throws an obvious InvocationTargetException.

Appreciate any pointers / examples how to handle that mapping,
preferrably with BeanUtils.


regards Chris


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]