Potential BUG in FieldKey.getDisplayName() or getDisplayID()
I found that both getDisplayName() and getDisplayid() return the same, regardless of if you have used the alias or not for the field name.
Here is my code:
FieldKey keys[]=this.getWeb_userDataProvider().getFieldKeys();
Option options[]=new Option[keys.length];
for (int i=0;i<keys.length;i++){
info("ID="+keys[i].getFieldId()+", Name="+keys[i].getDisplayName());
options[i]=new Option(keys[i].getFieldId(), keys[i].getDisplayName());
}
I tried to use it with and without the alias in the query:
Without alias:
SELECT last_name, first_name from user
With aias:
SELECT last_name AS "Last Name", first_name AS "First Name" FROM user
I was hoping that getDisplayId would give me "last_name" and getDisplayName() would give "Last Name". Turns out if you use without alias, both give "last_name" (rightly so) and if used with alias, they both give "Last Name". (BUG?)>

