Not an Issue
Details
Details
Assignee
Unassigned
UnassignedReporter
John Hurrell
John HurrellAffects versions
Priority
Who's Looking?
Open Who's Looking?
Created March 8, 2007 at 9:27 AM
Updated March 8, 2007 at 9:54 PM
Resolved March 8, 2007 at 9:54 PM
I recently added "order-by" to the mapping for a set collection and NHibernate complained with:
"NHibernate.MappingException: Cannot use order-by with generic set, no appropriate collection implementation is available"
Checking the code, it looks like ISet<T> is generic but not sorted.
I don't think this matters since "order-by" is merely appended to the SQL that is generated as opposed to NHibernate sorting the collection after its populated.
Find attached sample mapping fragments showing a mapping that works, followed by one that throws the exception when it includes "order-by".