Hi Stephen, Usually [undefined array element] error is referring to NULL value:
<cfset a = [1, 2, 3, javaCast("null", true), 5] />
<cfdump var="#a#" abort>
I am not an expert on ORM, but probably CF is expecting small_int while
database has null value, so CF holds null until you want to use it
(display or dump).
And probably CF9 convert is smart enough to convert null to 0, while CF10 allows to keep null as value.
The workaround could be to check if element 4 of your array isNull and convert it to 0 if required.
Cheers, Dmitry. On 11/06/2014 5:22 PM, Stephen M wrote:
I get the following error back as an element of the array returned from an ORMExecuteQuery"[undefined array element] Element 4 is undefined in a Java object of type class coldfusion.runtime.Cast$1."This is on my local dev box which has CF10. But, on production which runs CF9, the same code and the same data run fine.That element should simply be a small integer. The first element of the outer array looks like this C:\www\zzzz\views\user\view.cfm 48 - array 1 4340 2 Customer 3 Admin4 [undefined array element] Element 4 is undefined in a Java object of type class coldfusion.runtime.Cast$1.5 Customer.Admin 6 0Element 4 of that inner array should just be 0, 1 or 2. Why is it undefined?regards, Stephen --You received this message because you are subscribed to the Google Groups "cfaussie" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] <mailto:[email protected]>. To post to this group, send email to [email protected] <mailto:[email protected]>.Visit this group at http://groups.google.com/group/cfaussie. For more options, visit https://groups.google.com/d/optout.
-- You received this message because you are subscribed to the Google Groups "cfaussie" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/cfaussie. For more options, visit https://groups.google.com/d/optout.
