hi bobby,
i still do not get the benefit of not using an alias. could you please post a sample ?
jakob
Bobby Lawrence schrieb:
Well - it seems that the alias is not needed.
If the class only goes to one table for its data, why does the table need an alias?
If an alias was not used, you could specify string literals for a column name.
Jakob Braeuchi wrote:
hi,
ojb should always use the alias in front of the column name. if it does not, it could probably not translate the attribute name into a column name.
btw: what exactly is the problem with the alias ??
jakob
Vesely, Max [IT] schrieb:
Bobby,
I was able to do it by listing field names in a ReportQuery object. It also won't append table alias in front of the column name in this case.
Max.
-----Original Message-----
From: Bobby Lawrence [mailto:[EMAIL PROTECTED] Sent: Thursday, January 20, 2005 5:38 PM
To: ojb-user@db.apache.org
Subject: remove table alias in generated SQL?
Is there a way to tell OJB to not use the table alias in front of the column names when it generates SQL?
Currently, when you specifiy that a class comes from <tableA> and a field of that class comes from <fieldA>, OJB executes the following SQL:
SELECT A0.<fieldA> FROM <tableA> A0
If you can't map one class to multiple tables, I don't see why this is necessary.
Is there any way around this?
Instead of mapping a field to a specific column, I want to map it to a string literal so that it always has the same value for the class.
Ex. <field-descriptor column= 'some literal' AS myColumn">
-- Bobby
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]