Whew.... tried to fit it all into the title there :)
I have a base class/table for "Content" items in my CMS. I have a ContentItem subclass that has its own table, hence I map it with the SubClassMap base.
Now, I have another class with a collection of these ContentItems. I'd like to do an OrderBy on that collection using a property "SubmittedDate" that's defined on the base class, not the subclass:
// Collection开发者_开发百科 of items:
HasMany(x => x.Items)
.AsBag()
.Cascade.AllDeleteOrphan()
.Inverse()
.KeyColumn("ListId")
.LazyLoad()
.OrderBy("SubmittedDate desc, Title asc");
However, when I try to access the collection, I get an exception stating that "SubmittedDate" was an invalid column.
Is there any way to use a column from the base class's table for a .OrderBy in FNH?
精彩评论