The only other thing I have to add is that it seems like the keys that are
becoming arrays are those keys that are themselves nested into another
structure.
Main Struct |
key 1 | simple value like it should be
key 2 | [structure]
key 1 | [structure] <---- should be simple value, not a
structure at all
-- array that isn't supposed to be there --
1: used to be a simple value
Robertson-Ravo, Neil (RX) wrote:
> I am not sure about CFMX, but the following works in CF5 :
>
> <cfscript>
> foo = structnew();
> temp = StructInsert(foo,"Doprotocol", 1,"yes");
> temp = StructInsert(foo,"eventdate", "2002-01-09","yes");
> temp = StructInsert(foo,"gender", "male","yes");
> </cfscript>
> <cfwddx action="CFML2WDDX" input="#foo#" output="myfoo">
> <cfdump var="#foo#">
>
>
> ?
>
> -----Original Message-----
> From: Patti G. L. Hall [mailto:[EMAIL PROTECTED]]
> Sent: 14 January 2003 15:48
> To: CF-Talk
> Subject: WDDX bug?: structure keys into arrays unintentionally
>
>
> Has anybody else seen this?
>
> I've got a large structure with a bunch of single key values like:
>
> Doprotocol | 1
> Eventdate | 2002-01-09
> Gender | male
>
>
> When I wddx it and look at the results, a lot of these keys are turned into
> arrays. Not only that, but some of the arrays have 4 indices (all with the
> same values:
>
> Doprotocol | 1
> Eventdate |
> -- array --
> 1: 2002-01-09
> 2: 2002-01-09
> 3: 2002-01-09
> 4: 2002-01-09
> Gender |
> -- array --
> 1: male
>
> Why? Is this a bug that I need to log? I'm running CFMX with both updates
> and a security patch.
>
>
> Here is the wddx code. It's in a component.
>
> [cffunction name="saveWddxReport" output="false" returntype="void"
> access="public"]
>
> [cfargument name="saeid" required="true" type="numeric"]
> [cfargument name="report" required="true" type="struct"]
> [cfargument name="saveType" required="true" type="string"
> default="initial"]
>
> [cfset var wddxReport=""]
>
> [cfwddx input="#arguments.report#" action="cfml2wddx"
> output="wddxReport"]
>
> [cfif arguments.saveType eq 'initial']
> [cfquery name="saveReport" datasource="#request.dsn#"]
> Insert into saeReport_initial (saeid, report)
> Values (#arguments.saeid#, '#wddxReport#')
> [/cfquery]
>
> [cfelseif arguments.saveType eq 'final']
> [cfquery name="saveReport" datasource="#request.dsn#"]
> Insert into saeReport_final (saeid, report)
> Values (#arguments.saeid#, '#wddxReport#')
> [/cfquery]
> [/cfif]
> [cfreturn]
> [/cffunction]
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more
resources for the community. http://www.fusionauthority.com/ads.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4