Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parameter input box for Repeat one-to-many transformation disappear after export/import #2609

Closed
igarashitm opened this issue Mar 19, 2021 · 8 comments · Fixed by #2610
Closed

Comments

@igarashitm
Copy link
Member

It seems this happens only if I don't input for the count. If I put a number there it successfully restored.
atlasmap

We might want to put 1 as a default value if none is provided from user.

It might be related to https://issues.redhat.com/browse/ENTESB-16032

@pleacu
Copy link
Collaborator

pleacu commented Mar 19, 2021

Hey @igarashitm - this is likely an error but wanted to check. Currently (master) you don't get the multiplicity transformation select menu if your are 1-1 (have to be 1-many or many to one). Does CopyTo and Repeat apply one-to-one?

@igarashitm
Copy link
Member Author

No they should apply only for one-to-many.

@pleacu
Copy link
Collaborator

pleacu commented Mar 19, 2021

Ok - so the example in the issue is incorrect as its establishing a 1-1 (city to city). It should be one-to-many. Also - the multiplicity transformation select is inhibited if it's in a collection (like city to city). Is that also correct?

@igarashitm
Copy link
Member Author

nope, the target is in collection, means it's one-to-many

@pleacu
Copy link
Collaborator

pleacu commented Mar 19, 2021

Ok - still need a little help :)
In this case the source is in a collection as well as the target - is it still one to many? Shouldn't it be TransitionMode.FOR_EACH?
And if it is FOR_EACH - it should not have the multplicity select, right?

@pleacu
Copy link
Collaborator

pleacu commented Mar 19, 2021

@igarashitm - I have a trivial fix for the empty repeat field (I needed to upcase the integer field before defaulting). The default code sets all number fields to 0. In my version (and 2.1.6) - you don't get the multiplicity action pull-down menu for city-city (because of collection to collection). if this is an error we can close this issue with my upcoming default integer fix and create a new issue.

Here's the code in question:

if (sourceMappedCollection && targetMappedCollection) {

@igarashitm
Copy link
Member Author

Note that the source field here is /order/address/city which is not in collection, as opposed to the target collection field /addressList<>/city which is in collection, which makes it one-to-many. Yes if both of them are collection then it is for-each mode.

@pleacu
Copy link
Collaborator

pleacu commented Mar 19, 2021

ugh - yup - I was grabbing the wrong city - sorry. This should fix this issue...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants