Hi,

I have a 4 level hierarchy of data in my application with a
bi-directional one-to-many relationship between each level as follows:

PlanPoint (parent)
-- UserScenario (child)
---- Scenario (grandchild)
------ Competitor (great grandchild)

I have a hibernate back end running under JBoss and I am using FDS to
synchronise the changes from my Flex UI.  My DB will be Oracle, but
for the time being I am just testing with a HSQLDB for convenience.

I have managed to create a destination in FDS which will retrieve the
parent objects.  The hibernate mapping docs specify the further
retrieval of the graph of objects attached to them.  This all works
fine and performs reasonably well, although I have been unable to get
any meaningful lazy loading to work (a problem for another time).

My problem comes in that the user will interact deeply with the graph
of objects during the client session.  This includes adding, removing
and updating objects at all levels.

What I can't seem to get right is the interaction in the Flex layer
which copes with this level of interaction.

For instance if I want to add a new Competitor to a Scenario do I 
(i) create all new objects on the client and then synchronise the
server, or 
(ii) initiate creation of a new object on the server and then modify
it on the client?

I seem to have problems in both directions and the same isue for
delete and to a certain extent modify.

I only have a single FDS destination defined, so any alterations
appear to go through the PlanPoint Object at the root of the tree and
as a result much more data gets passed back and forth than I would like.  

I'm not sure if I am just a little simplistic in my design and need
more sophistication in my relationship between the client and server,
or whether I just need a bit more code in my client to manage the
object state.  

Any guidance would be greatly appreciated as I'm beginning to swim in
circles.  

Reply via email to