You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When inserting multiple associative arrays, the order in which the keys are defined in the first array is what is used for mapping the rest of the values. It should be based on key instead. I ended up with malformed data because values were ending up in columns they didn't belong in.
Steps To Reproduce
Very trivial example below, but assume that you have this data being constructed based on several conditions wherein the key order is different in the separate branches.
Assuming you have a table named people that has first and last as varchar fields.
Version: 2.4.6
Bug Description
When inserting multiple associative arrays, the order in which the keys are defined in the first array is what is used for mapping the rest of the values. It should be based on key instead. I ended up with malformed data because values were ending up in columns they didn't belong in.
Steps To Reproduce
Very trivial example below, but assume that you have this data being constructed based on several conditions wherein the key order is different in the separate branches.
Assuming you have a table named
people
that hasfirst
andlast
asvarchar
fields.Check the table and Susan's first and last names are swapped.
Expected Behavior
Should evaluate an insert statement like the following:
Instead it evaluates like this:
Possible Solution
Use keys for associative array case as opposed to the order within the array.
The text was updated successfully, but these errors were encountered: