NHibernate: how to sort a collection by a property of a referenced entity
问题 I would like to to sort CampaignRetailers by Retailer.Name. However Retailer is a referenced entity on CampaignRetailers. I've tried order-by="Retailer.Name" . Is this kind of sorting possible? <class name="Campaign" table="Campaign"> <id name="Id"> <generator class="identity"/> </id> <set name="CampaignRetailers" table="CampaignRetailers" cascade="all-delete-orphan" inverse="true" order-by="Retailer.Name"> <key column="CampaignId" not-null="true" /> <one-to-many class="CampaignRetailer" /> <