forcing nested property's table prefix in query result

29 views
Skip to first unread message

Daniel

unread,
May 22, 2013, 3:18:03 PM5/22/13
to cfwh...@googlegroups.com
I noticed that when there's a naming conflict arising from multiple tables that share column names, the first table that is listed under include gets the same column name, but the subsequent tables get prepended with the table's name. Is there a way to force all nested properties' columns to have the table name prepended? I'm worried if there is any change in the database at any time in the future it could cause unintended results instead of an error.


Chris Peters

unread,
May 22, 2013, 3:33:39 PM5/22/13
to cfwh...@googlegroups.com
Take a look at the useExpandedColumnAliases setting on the Config and Defaults chapter:
http://cfwheels.org/docs/1-1/chapter/configuration-and-defaults

This is a setting that I always turn on for consistency's sake.


On Wed, May 22, 2013 at 3:18 PM, Daniel <danie...@gmail.com> wrote:
I noticed that when there's a naming conflict arising from multiple tables that share column names, the first table that is listed under include gets the same column name, but the subsequent tables get prepended with the table's name. Is there a way to force all nested properties' columns to have the table name prepended? I'm worried if there is any change in the database at any time in the future it could cause unintended results instead of an error.


--
You received this message because you are subscribed to the Google Groups "ColdFusion on Wheels" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cfwheels+u...@googlegroups.com.
To post to this group, send email to cfwh...@googlegroups.com.
Visit this group at http://groups.google.com/group/cfwheels?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Daniel

unread,
May 22, 2013, 3:44:49 PM5/22/13
to cfwh...@googlegroups.com
Thanks,

Looks like that is application wide change, I don't know if I'll have time to go through and update all controllers and views that may rely on this, but good to know for next time

George

unread,
May 29, 2013, 10:54:10 PM5/29/13
to cfwh...@googlegroups.com
Can I get a custom separator character between the table and the column name?
Reply all
Reply to author
Forward
0 new messages