I'd like to restrict my thought to the stage of the beans:<snip/> The Beans describe the fields that the XForm show to the user. The Bean has the same fields as the XForm. In this point I feel like we can use another approach. Because I looks like the same fields need to be writen 2 times: In the XForm itself and into the Bean. :-(
In case of XForm, and flowscript you come to the point when you can say, okay the bean
is finished, ready for getting persistant.
Or other way around, okay now I need the Bean form the persistant store
Hibernate says datastore, OJB says broker, in either case you have some container.
You tell the container here persist this bean. your xml-mapping has some mapping from bean to the tables. That's all.
More general:
You may have the relation XForm {n} ---> {m} Bean {r} --> {s} Table.
The mapping from the beans to the tables is described declarative by some mapping xml of the O/R mapping tool.
Hibernate say {bean}.hbm.xml, OJB says respository.xml.
The mapping from XForm to the Bean is asfasik described procedural in the XForm Action, or the
procedural java flow script. In both cases you set or get fields of the Bean, either unconditionally, or
depending on some more internal calculation.
That's just some thought from me about your questions, hope i caught your concerns,
and helped a bit in grasping the whole picture
bye bernhard