Gotcha. Would something like this work?
<cffunction name="getColumnName" access="private" returntype="string"
output="false" hint="I return the table name for the passed table alias.">
<cfargument name="columnAlias" type="string" required="true"
hint="Alias of target table." />
<cfset var result = arguments.columnAlias />
<cfset var lookup =
XMLSearch(_getConfig().getObjectConfig(_getAlias()),
'/object/[EMAIL PROTECTED]"#arguments.columnAlias#"]') />
<cfif ArrayLen(lookup) eq 1>
<cfset result = lookup[1].xmlAttributes.name />
</cfif>
<cfreturn result />
</cffunction>
On Jan 18, 2008 10:18 AM, Tom Chiverton <[EMAIL PROTECTED]>
wrote:
> On Friday 18 Jan 2008, Brian Kotek wrote:
> > I had just written a quick function that did this for me in my Gateways
> (or
> > in a component the Gateways extend):
>
> As I mentioned, this is fine, but it to do column aliases looked like a
> pain.
>
> We have column name changes more often than table name changes.
>
> --
> Tom Chiverton
> Helping to continuously entrench edge-of-your-seat patterns
> on: http://thefalken.livejournal.com
>
> ****************************************************
>
> This email is sent for and on behalf of Halliwells LLP.
>
> Halliwells LLP is a limited liability partnership registered in England
> and Wales under registered number OC307980 whose registered office address
> is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.
> A list of members is available for inspection at the registered office. Any
> reference to a partner in relation to Halliwells LLP means a member of
> Halliwells LLP. Regulated by The Solicitors Regulation Authority.
>
> CONFIDENTIALITY
>
> This email is intended only for the use of the addressee named above and
> may be confidential or legally privileged. If you are not the addressee you
> must not read it and must not use any information contained in nor copy it
> nor inform any person other than Halliwells LLP or the addressee of its
> existence or contents. If you have received this email in error please
> delete it and notify Halliwells LLP IT Department on 0870 365 2500.
>
> For more information about Halliwells LLP visit www.halliwells.com.
>
>
> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> -- --
> Reactor for ColdFusion Mailing List
> [EMAIL PROTECTED]
> Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> -- --
>
>
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[EMAIL PROTECTED]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --