Barney,

Boy, this is getting OT quick but your statement:

>  Queries are really just a struct of arrays, where a
> missing array index will be automatically defaulted to 1,

Isn't exactly true.  For instance I just tested this out the other day
copying a query assuming a default index of 1 into a structure.

then passing the structure as an argumentCollection - doing this
failed as none of my "types" were correct.  Each element in my struct
was of type class coldfusion.sql.QueryColumn

I have attached a file that demonstrates the problem.  

Interestingly enough, if the init method expects the arguments to be
of type "ANY" but each "setter" method expects of an explict type such
as "STRING" it works fine.

You can see the behaviour in the files attached - they are very very
rudimentary to be a proof of concept.  However, to see the failure due
to type mismatch just change the init attribute of "name" to type
string from any.  the init method will then fail even though the
setter (expecting type string) does not if the init method expects
any.

Interestingly enough, when I passed this same struct into a CFC with
all of the arguments expected to be type "any" things went smoothly

I thought it was pretty odd at least.  As always, if you go back and
add the index when converting from query to struct then everything
works just as it should.


This is all on MX6.1 as I don't have a copy of 7 available to test it against.

Bill



----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to 
[email protected] with the words 'unsubscribe cfcdev' as the subject of the 
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting 
(www.cfxhosting.com).

CFCDev is supported by New Atlanta, makers of BlueDragon
http://www.newatlanta.com/products/bluedragon/index.cfm

An archive of the CFCDev list is available at 
www.mail-archive.com/[email protected]

Attachment: var.cfc
Description: Binary data

Attachment: val_cvc_test.cfc
Description: Binary data

Reply via email to