Duplicate alias
----------------
Key: HHH-4119
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-4119
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.2.5
Environment: Hibernate 3.2.5, database sybase 12.52
Reporter: roger cheng
Attachments: SybaseIssue.tar.gz
The mapping file I used:
<hibernate-mapping package="com.novell.uddi3.hibernate.entities">
<class name="BusinessVO" table="businessvo">
<id name="id" type="string">
<generator class="assigned" />
</id>
<list name="Contacts" cascade="delete" lazy="true">
<key column="bid" />
<list-index column="sortorder"/>
<one-to-many class="ContactVO" />
</list>
</class>
<class name="ContactVO" table="contacts">
<id name="id">
<generator class="native"/>
</id>
<array name="PersonName" cascade="all"
table="personnames" fetch="join">
<key column="cid" />
<list-index column="sortorder"/>
<composite-element class="org.uddi.v3.core.PersonName">
<property name="_value" type="string"
column="personname" length="4000"/>
</composite-element>
</array>
</class>
</hibernate-mapping>
When I execute a hsql like following:
Query q = session.createQuery("from BusinessVO b" +
" left join fetch b.Contacts c" +
" left join fetch c.PersonName");
BusinessVO vo = (BusinessVO)q.uniqueResult();
From the console, the following sql was created:
select
businessvo0_.id as id0_0_,
contacts1_.id as id1_1_,
personname2_.cid as cid1__,
personname2_.personname as personname1__,
personname2_.sortorder as sortorder1__,
contacts1_.bid as bid0__,
contacts1_.id as id0__,
contacts1_.sortorder as sortorder0__,
personname2_.cid as cid1__,
personname2_.personname as personname1__,
personname2_.sortorder as sortorder1__
from
businessvo businessvo0_
left outer join
contacts contacts1_
on businessvo0_.id=contacts1_.bid
left outer join
personnames personname2_
on contacts1_.id=personname2_.cid
The alias 'cid1__, personename1__, sortorder1__' are duplicate, is this a bug of
hibernate?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira