View Full Version : Table alias name is locale based!

10-31-2008, 04:52 AM

We noticed something interesting last night with metadata.

When a query is generated it creates sql like so

select * from BV_TABLE_A TableName

Where TableName is the name of the business table.

However, it uses the SERVER locale to lookup the alias for BV_TABLE_A. So if your server locale doesnt match your metadata locale then it wont use the nice name for the alias, it will use the ID

The problem then is that the ID's often dont work because they tend to be very long, and the DB (oracle) rejects them as being identifier too long.

So thats one to look out for! I think it's a bug really because there's no need to use locale specific names here, it could just use TABLEA, TABLEB like it does with the columns where it uses COL1, COL2 etc. I'm glad we spotted it was the locale difference otherwise this could have been an absolute mare to work out.

This is 1.7GA, i know things have changed with long identifiers in 2.0 a little, but not sure if this "issue" still exists.

I havent tested yet, but i think the workaround is to set the locale-language and locale-country in the web.xml. At the moment we have a default web.xml which has these blank, so i assume thats why it inherits from the OS.

Hey ho...


10-31-2008, 05:06 AM
Hey Dan, if you think you found a bug, file a bug report.
Please make sure to attach the XMI so that we can all see what you're up to :-)
Thanks in advance,

10-31-2008, 05:09 AM
Ok; Do you agree by my description that it's a bug though? Assuming i've explained it clear enough!

Perhaps there's reason for it that I dont understand... thats why i posted for discussion.

10-31-2008, 06:16 AM
I think Oracle supports long aliases, but only considers the first thirty-something characters. Probably that's what's causing an issue for you.
I do remember seeing a related bug, but it's been months ago, can't recall exactly what it was about.

Anyway, the best thing is always to file a bug report if you suspect something is fishy. Even if there is a perfectly technically valid reason, if it doesn't work, it simply doesn't work :-)

10-31-2008, 07:51 AM