You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-cs@ibatis.apache.org by Basem Emara <ba...@netopiatech.com> on 2008/09/20 14:27:10 UTC

Alias to column names?

Is there a way to give alias names to column names? I'd really like to
define the column name aliases at the top of XML file, then use those
alias names in parameter maps and inline result maps. It's a real pain
when database field name changes (or db migration) when I have to dig
thru all the inlines and maps. This way, I can just change the alias
section at the top. Can this be done?


RE: Alias to column names?

Posted by "Benckert, Joe" <jb...@triongroup.com>.
Couldn't you just 'AS' your column names in your select statements?
Then you'd only have to maintain the sql.

 

________________________________

From: Milivoj Milani [mailto:milivojm@gzr.hr] 
Sent: Monday, September 22, 2008 3:37 AM
To: user-cs@ibatis.apache.org
Subject: RE: Alias to column names?

 

I doubt it, I don't think you can do that.

 

________________________________

From: Basem Emara [mailto:basem@netopiatech.com] 
Sent: Saturday, September 20, 2008 2:27 PM
To: user-cs@ibatis.apache.org
Subject: Alias to column names?

Is there a way to give alias names to column names? I'd really like to
define the column name aliases at the top of XML file, then use those
alias names in parameter maps and inline result maps. It's a real pain
when database field name changes (or db migration) when I have to dig
thru all the inlines and maps. This way, I can just change the alias
section at the top. Can this be done?

 

 
Confidentiality Notice: This e-mail transmission may contain
confidential or legally privileged information that is intended only for
the individual or entity named in the e-mail address.
If you are not the intended recipient, you are hereby notified that any
disclosure, copying, distribution, or reliance upon the contents of this
e-mail is strictly prohibited. If you have received this e-mail
transmission in error, please reply to the sender, so that arrangements
can be made for proper delivery, and then please delete the message from
your inbox.


Confidentiality Notice: This e-mail transmission may contain confidential or legally privileged information that is intended only for the individual or entity named in the e-mail address.
If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or reliance upon the contents of this e-mail is strictly prohibited. If you have received this e-mail transmission in error, please reply to the sender, so that arrangements can be made for proper delivery, and then please delete the message from your inbox.

RE: Alias to column names?

Posted by Milivoj Milani <mi...@gzr.hr>.
I doubt it, I don't think you can do that.

________________________________

From: Basem Emara [mailto:basem@netopiatech.com] 
Sent: Saturday, September 20, 2008 2:27 PM
To: user-cs@ibatis.apache.org
Subject: Alias to column names?



Is there a way to give alias names to column names? I'd really like to
define the column name aliases at the top of XML file, then use those
alias names in parameter maps and inline result maps. It's a real pain
when database field name changes (or db migration) when I have to dig
thru all the inlines and maps. This way, I can just change the alias
section at the top. Can this be done?