Fixed
Details
Assignee
Pothys - MitrahSoftPothys - MitrahSoftReporter
Brad WoodBrad WoodPriority
MinorLabels
Fix versions
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Sprint
None
Details
Details
Assignee
Pothys - MitrahSoft
Pothys - MitrahSoftReporter
Brad Wood
Brad WoodPriority
Labels
Fix versions
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Sprint
None
Created 22 February 2017 at 16:52
Updated 9 June 2023 at 16:44
Resolved 2 June 2021 at 15:03
The fol*lowin*g code is handled correctly up until the point where I try to add an array to the query as a value. (Yes, I put complex objects into query columns on purpose. It's very handy for ad-hoc structured data)
Screenshot is attached of what the query object looks like when dumped out.
I know why this happens-- it's because of the behavior where you can pass an array for a column and Lucee adds a row for each index in the array. I think that should still continue to work as it does for functions like queryAddColumn() but in this case that behavior doesn't make sense since I'm clearly adding a single record to my query as defined by the struct. Each struct key is meant to represent a single value for that row. When arrays are passed inside of a struct for a single row to be added, they should be taken as a single discrete value and added only to that row.
I've added a second screenshot that shows what the query object should look like (Only 4 records where the 4th record contains arrays)