Ask Ben: Converting A Struct To A Query (And More Java)

<!--- Create an structure for the query. --->
<cfset objParts = StructNew() />
 
<!--- 
	Copy the data to the structure, mapping the columns 
	to the keys. 
--->
<cfloop index="strColumn" list="#qParts.ColumnList#" delimiters=",">
	 
	<!--- Add column as array to column key. --->
	<cfset objParts[ strColumn ] = qParts[ strColumn ].ToArray() />
 
</cfloop>

For Cut-and-Paste