[
http://opensource.atlassian.com/projects/hibernate/browse/HBX-973?page=co...
]
Max Rydahl Andersen closed HBX-973.
-----------------------------------
Resolution: Fixed
Fix Version/s: 3.2.beta11
fixed - see HBX-826 (feedback wanted ;)
ClassCastException: hbm2java generates HashSet instead of TreeSet
when <set .... sort="MySorter"> is defined.
-------------------------------------------------------------------------------------------------------------
Key: HBX-973
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HBX-973
Project: Hibernate Tools
Issue Type: Bug
Components: hbm2java
Affects Versions: 3.2beta8
Environment: Hibernate Tools 3.2.0.beta8
Derby
Reporter: Bill Mair
Fix For: 3.2.beta11
Mapping:
<class name="CharSkillGroup">
<composite-id>
<key-many-to-one name="charRecord" class="CharRecord" >
<column name="characterId" not-null="true" />
</key-many-to-one>
<key-many-to-one name="skillGroup" class="SkillGroup" >
<column name="skillGroupId" not-null="true" />
</key-many-to-one>
</composite-id>
<set name="skills" inverse="true" lazy="false"
cascade="all" sort="eveapi.CharSkillSorter">
<key>
<column name="characterId"/>
<column name="skillGroupId"/>
</key>
<one-to-many class="CharSkill"/>
</set>
</class>
Generates:
private Set<CharSkill> skills = new HashSet<CharSkill>(0);
instead of
private Set<CharSkill> skills = new TreeSet<CharSkill>();
This causes a class cast exception when persisting.
--
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