G'day
Just a heads-up that I've just raised this (http://code.google.com/p/
openbluedragon/issues/detail?id=298):
[quote]
When a <cfreturn> (or return) statement is within a <cftransaction>
block, nothing is returned.
See this simple repro case:
<cffunction name="bad">
<cftransaction>
<cfreturn createUuid()>
</cftransaction>
</cffunction>
<cffunction name="good">
<cftransaction>
</cftransaction>
<cfreturn createUuid()>
</cffunction>
<cfoutput>
good(): [#good()#]<br />
bad(): [#bad()#]<br />
</cfoutput>
Sample output:
good(): [BDF0CF52-3C8D-4F6D-8CB559F223F0BE9B]
bad(): []
This code works as one would expect on CF8, CF9 and Railo 3.1.2. It
is a problem on OBD & BlueDragon.net
OBD version (from server.bluedragon):
builddate 2010-10-27 14:24:51 GMT
edition 8
level GPL
releasedate 27 October 2010
state stable
version 1.4
BlueDragon.net version (from server.coldfusion):
productversion 7,1,0,382
(I know you guys don't have anything to do with BlueDragon, but this
is just FYI, and in case you can advise New Atlanta about this).
[/quote]
There's no urgency for me with this because I can work-around it by
moving the return statement outside the <cftransaction> (which I think
we can agree is a better place for it anyhow ;-)
I just thought I should let y'all know, so other people don't fall
into the same trap. It did take me a few hours to work out WTF was
going on...
Cheers.
--
Adam
--
Open BlueDragon Public Mailing List
http://www.openbluedragon.org/ http://twitter.com/OpenBlueDragon
official manual: http://www.openbluedragon.org/manual/
Ready2Run CFML http://www.openbluedragon.org/openbdjam/
mailing list - http://groups.google.com/group/openbd?hl=en