|Re: How to work with circular references? [message #85614 is a reply to message #85549]
||Wed, 02 July 2008 07:39
| Max Bureck
Registered: July 2009
Ok, I could write one B to Y,Z with the precondition, that the Z does not |
exists and one B to Y rule with the precondition that Z does exists and
set the reference from B to the existing Z in the body of the rule. This
is a bit lengthy, because the B to Y rule does a lot. Maybe I can use
abstract rules and inheritance to eliminate the duplicate parts of the
> I'm having some trouble with circular references lately. How do I cope
> with the situation, that two output elements have references to the same
> third element?
> In one case it was like that:
> Input model:
> A to X
> B to Y,Z
> Output model:
> So that both Y-model elements have a reference to the same Z.
> Is there declarative way to express that?
> My only idea is to create a helper-method, which is called in Mapping B to
> Y that checks if Z already exists. If Z exists, it returns it, if not, it
> calls a lazy rule creating Z. Is this the way to go, or is there a better
Powered by FUDForum
. Page generated in 0.01759 seconds