Hello,
is there a way to remove the using of aliases in SQL Selects? I want it because its is causing some conflicts in two many-to-one mappings in the same hbm that uses the same column names.
Example:
Code:
<class name="X" table="X">
<composite-id name="id" class="XID">
<key-many-to-one name="foo" class="Foo">
<column name="A"/>
<column name="B"/>
<column name="C"/>
<column name="D"/>
</key-many-to-one>
<key-property name="num" type="short"/>
</composite-id>
<many-to-one name="bar" class="Bar" update="false" insert="false">
<column name="A"/>
<column name="B"/>
<column name="C"/>
<column name="E"/>
</many-to-one>
.....
</class>
Columns A, B and C are shared by the two associations, so when I retrieve objects from this class x I get duplicated aliases and my sql dont work.
One solution is eliminate aliases in select because in this case it is not used in the where clause.
Anyone knows how to do that? Or there is other way to solve it?
Thank you