CFCs When you must use explicit naming -- Frameworks Potential Gotcha
Since HHWD often uses test databases and testing areas for internal development servers, and online client sandboxes, we set up our application.cfc to refer to many items by reference.
Instead of using
datasource='databasefoo'
We will have an application.cfc entry:
then in the CFC cfquery use
Similarly, We do the similar setups for CFCs. Since the testing server and sandboxes a different directory structure than our production area, we normally use:
and then refer to it in our code as:
This all works great .... EXCEPT when your framework/OO needs and wants an explicit reference. This would be cases where you are establishing a bean or using a returntype:
in DAOs:
The same situation occurs when you declare a bean argument with the cfc as its type:
You must use the explicit reference here as well.
As you can tell, I just spent a few hours in the school of head-bangers figuring out the issue... after I did a sitewide replacement of all "datafoo.cfc." with "#application.cfc#".

There are no comments for this entry.
[Add Comment]