I'm working on an internal project to bind a rather complex XML schema
to an object graph (XML encoding isn't sufficient). It is fairly
straightforward using the XML binding frameworks, except when
relationships get involved - particularly toMany relationships
A typical XML binding framework will is looking for a
setRelationshipArray(List) method. When standing up new objects, this
is sufficient - but when binding to an existing object graph, the
setter has to intelligently synchronize the List to the relationship
to avoid unnecessary (and potentially invalid) insert/deletes. This
also is a problem with WebWork's type conversion... in the past, I've
addressed it with WebWork by creating a "synchronizing" setter as
described above, but it is kludgy at best. It is at the peak of
kludginess when many-to-many's are used with a join object, because
the added object is likely not registered with the context (and
therefore hollow)
It seems like there might be a better way to do this without
triggering phantom delete/inserts, but it isn't immediately obvious to
me... has anybody come up with particularly clever ways to address
this in the past?
Cris
This archive was generated by hypermail 2.0.0 : Fri Mar 03 2006 - 11:52:56 EST