Hi,
I have declared this:
Code:
@OneToMany(cascade={CascadeType.ALL}, fetch=FetchType.LAZY, mappedBy="fk")
@OrderBy("setId ASC, name ASC, setIndex ASC")
@JoinColumn(name="FK")
Set<CompoundPK> myset;
CompoundPK contains the strings setId, name and value.
The generated sql works fine, the order by is applied correctly.
But the resulting set is not always in the same order as the records from the resultset.
It seems to work if setId is a decimal string like 1, 2 or 3.
But if it is hex like 69, 6a, 6b the set order ist:
6a, 6b, 69.
What's wrong here?
Thank you.
P.S. I'm using Hibernate 3.2.6