If I change the <set> tag to include both order-by="value" and sort="natural", I do not get the same error. The SQL is correct, it uses order-by; however, it of course sorts it afterward in java, which I was trying to avoid.
.hbm.xml:
Quote:
<set name="mySet" table="B" cascade="all" order-by="value" sort="natural">
SQL:
Quote:
DEBUG SQL:401 - select myset0_.A_id as A3_1_, myset0_.B_ID as B1_1_, myset0_.B_ID as B1_1_0_, myset0_.value as value1_0_ from B myset0_ where myset0_.A_id=? order by myset0_.value