The object 'dissapearing' is expected by the programmer but, as you point out, an instance of the object is not actually needed here (just the result of the method call 'GetGroups'). I will certainly be rewriting that. The really odd thing about it is the query of queries that appears to do nothing.
I'd like to know if anyone has had to do 'SELECT * FROM myQuery' in a QoQ for any reason. The system is large and messy enough for bugs that go unnoticed for some time by changing things without caution. Thanks again, Dominic On 17/10/2007, Ben Doom <[EMAIL PROTECTED]> wrote: > > At a guess, I'd say it's someone misunderstanding when objects are > created and deleted. Since the GroupObj object is created locally, it > would dissapear at the end of the function, unless there is another > pointer to it. Which there would be if it was returned. > > Alternately, it might be called by something that expects a query object > instead of a Group object, so this is a way to convert the results > (which, it would appear, don't need converting). > > Either way, I'd clean the code on a development box and see if anything > breaks. If not, then you are clearly not mad. > > --Ben Doom > > Dominic Watson wrote: > > I am blessed (sarc) with leading the development on a project update. > The > > original code has some very interesting code in it (one example is here: > > http://fusion.dominicwatson.co.uk/2007/09/cfinsert-hard-way.html) and > I've > > just stumbled upon something which seems utterly ludicrous. > > > > Before I delete it though, I'd like to know if anyone can think of a > reason > > for it? Here it is: > > > > > > <cffunction name="GetGroups"> > > <cfobject component="#request.components_path#.Group" name="GroupObj"> > > <cfset myQuery = GroupObj.GetGroups( )> > > > > <cfquery dbtype="query" name="myQuery"> > > * select* * > > * from* MyQuery > > </cfquery> > > > > <cfreturn MyQuery> > > </cffunction> > > > > Perhaps the query of queries is an odd fix to some ColdFusion bug? This > > happens in more than one place in the code. > > > > Thanks in advance, > > > > Dominic > > > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Get involved in the latest ColdFusion discussions, product development sharing, and articles on the Adobe Labs wiki. http://labs/adobe.com/wiki/index.php/ColdFusion_8 Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:291340 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4