Hibernate doesn't recognize a field with same name and different capitalization with
the discriminator field
------------------------------------------------------------------------------------------------------------
Key: HHH-6832
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-6832
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.6.8
Environment: Oracle 11g
Sun JDK 6
Hibernate 3.6.6 & 3.6.8
Tomcat 6.0.18
Reporter: Amir Pashazadeh
Attachments: discriminator-capitalization.zip
I have a entity with a discriminator column mapped as
{code}
@DiscriminatorColumn("discriminator")
{code}
and I mapped the column in entity as
{code}
@Column("Discriminator", insertable=false, updatable=false)
{code}
(the capitalization of the column names are different).
When querying the entity, hibernate creates a query as:
{code:sql}
select
...
this_0.discriminator DISCRI_1525,
...
this_0.Discriminator DISCRI_1525,
...
{code}
as you see the database column is selected twice, but with the same alias.
If you page this query using Oracle dialect, an *ORA-00918: column ambiguously defined*
will occur.
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira