|one to many without using operations? [message #635905]
||Thu, 28 October 2010 15:03
| James Sharp
Registered: September 2010
I keep coming into an issue whereby my mapping requires me to generate multiple instances of the same objects in my target language from one instance in the source langauge. (A one to many as it were)
ETL will only generate the target objects once from the source objects within a rule. Is there any reason for this?
The equivalent method provides a much tidier way to generate the objects and writing these as operations is going to cause all manner of complicated loops for what I require. It seems I keep coming back to this same issue.
I have not yet looked at the ETL source (waiting for IT services to let me access the SVN), but would this fall within the scope of ETL?
Would the ETL framework allow for a new equivalent() type method to be written which could return a duplicated collections of target objects from one set of source objects?
|Re: one to many without using operations? [message #636273 is a reply to message #635922]
||Sat, 30 October 2010 08:50
| Dimitrios Kolovos
Registered: July 2009
I think you're right; I now see your point. I guess the simplest thing
to do would be to add support for another annotation (e.g. @nocache) to
transformation rules which would make such rules forget any previous
invokations and return fresh results every time. Could you please file
an enhancement request for this in the bugzilla?
James Sharp wrote:
> Hi dimitris,
> I'm afriad this won't work as I don't know how many I will need, and I
> simply call the equivalent() method multiple times from different points
> in different rules.
> Basically, my problem is this:
> In this instance I have an if statement in my source language with
> multiple assignments inside. For my target language I must specify the
> assignment variable and then provide the if statement with the
> assignment value inside the if statement.
> I have written rules which deal with the complexities of mapping my
> predicates for the if statements (there is also a direct if statement
> mapping which used these predicate rules before) but as the predicates
> are the same for all assignments within the if statement, then the
> predicate objects are only generated once by the rule. Furthermore I
> also need to check the else clause as this may potentially contain more
> new assignments. I don't see how the suggested method works unless you
> know how many you need before firing the rule and I am doing this on the
> I think the method you have suggested would simply be overwritten each
> time for this scenario, is that correct?
> Is there a way to make ETL forget it has already fired the rules
> associated with these source elements perhaps?
> Many Thanks,
Powered by FUDForum
. Page generated in 0.03734 seconds