-
Notifications
You must be signed in to change notification settings - Fork 2
Array handling with and without set_array #80
Comments
This comment has been minimized.
This comment has been minimized.
It seems that the "workaround" nor the direct way with
breaks the process. Also breaks withou set_array: See Playground without set_array it only works if you use
This hints perhaps an error for another ticket: you only can refrence/target subfields of objects in an array but you cannot do that with an string in an list of strings. |
I added playground examples to better illustrate the errors. |
An workaround with set_array is only working if there at least on instance of the subfield is expected otherwise an emtpy array will appear. |
The samples from #80 (comment) seem to be fixed with #82, both look good: w/ set_array, w/o set_array.
Tweaked your sample: remove if-conditional and add 'mods' namespace to 'displayForm': looks good. (In general issue examples should point to the production playground, not test, so we can easily compare them in review). We're certainly not done with the |
Great! +1
I think the error was intentiona or at least the result was right :Dl. To show that vacuum() does not help with empty arrays and this is a problem for the . This should be a new ticket.
|
wait i spottet the following for working without |
Fixed with related changes from #82 / #87: issue on prod, fixed on test. |
Co-authored-by: Jens Wille <[email protected]>
I wait for fix of #87 to review this again. |
I don't understand, still looks good to me, as linked in #80 (comment):
|
I set this on hold, because of the combined PR for this and the other ticket #82. Adding and copying sub-fields seem to work. What seems not to work is copying and moving objects into an array: See here in the Playground too This might be a separate ticket though. |
Right, what's missing here is |
PS: From the original tests it seems that |
It seems that fix can only create arrays of objects, if with
set_array
the target array is created or it already exists.If one only creates an array by
copy_field("sourc_field", "target.$append.field")
The example are taken from but look at the playground to explore:
https://gitlab.com/oersi/oersi-etl/-/commit/3c3bb1cdb907b631c9848f245d8ca71aa45c17b2
connected to: #78 and #65
Without
set_array
it seems to handle newly created arrays as list of values but not of objects._______with
set_array
See example also in the playground=>
_________without
set_array
See example here in Playground.=>
The text was updated successfully, but these errors were encountered: