PDA

View Full Version : Using cardinality to control relations


ludw
04-03-2007, 12:27 PM
Does anyone use <Relation>, <toBizClass> and <cardinaity> in the xml configuration file to control relations between user's objects.
I've different masterdata classes, say: MDC1, MDC2, MDC3.
I would like to control relations so that any MDC1 object could be parent of max 1 MDC3.
Is it possible just using <Relation> tag? How to specify parent/child classes?
Many thanks

jdh
04-19-2007, 07:26 AM
Sorry but you cannot control cardinaity through XML configuration. Currently this only used by some of the XML functionality but is not used to control the business objects.

The best way to develop a preApplyListener that will do the checks you require or overwrite the addElement method on the business object.