Normal n to n relationship:
Code:
foo <-- foo2bar --> bar
Can I order the Set foo.bar using a column of bar; bar.name for instance?
the .hbm. xml for the attribute foo.bar:
Code:
<set
name="bar"
table="foo2bar"
lazy="false"
inverse="false"
cascade="none"
sort="unsorted"
order-by="name asc"
>
<key
column="foo"
/>
<many-to-many
class="bar"
column="bar"
outer-join="auto"
/>
</set>
I get "Uknown column 'bar2a0_.name' in in 'order clause'"
Offcource bar _has_ column name,
Is it possible to sort a many-to-many set using a column on the other side?
thanks,
Bas