-
Notifications
You must be signed in to change notification settings - Fork 2
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
Writing into non-existing arrays with $last, $first and *-wildcard should be skipped? #369
Comments
It also seems that catmandu is not that consistend in its behaviour: https://github.com/TobiasNx/Catmandu-Testing/tree/master/ArrayHandling $append does not create new array with set_array
|
Then we should do the same here, right? |
To be honest, I am not in favour of this even though Catmandu does this BUT it is not consitent. And Catmandu itself seems not to be consistent with this. I prefer the behaviour that $last and $first only can do anything if the referred array exists since it is a relational statement imo. |
There is a thread concerning the wildcards over at metadaten.community: When receiving the answers we can move on. |
So the result of my discussion with @jorol at metadaten.community: Catmandus behaviour is:
|
I rephrased the issue. ✔️ MF-Fix supports it
Status: In Catmandu the family of the Since in context of lobid, rpb and other project we heavily utilize So I suggest that this issue should be fixed together with #309 |
Came up within #368 but is not part of the changes of the related pr this is current master behaviour :
While reading a path with one of the following array wildcards
$last
,$first
and*
skips the step due to no existing basis for reading,writing new values with these array wildcards does not and creates a new element/array with one of wildcard as part of the pathnames
copy_field
add_field
set_array
In my opinion these creations should be skipped due to non existing arrays and only $append/$prepend should create pathes.
This is connected to: #161
The text was updated successfully, but these errors were encountered: