It seems that the IMultiCritera implementation is broken if any of the ICriteria added to it query base types that require multiple queries (e.g. derived types that have different joined tables).
What appears to be happening is that MultiCriteriaImpl.GetResultsFromDatabase assumes that indexes in loaders align with indexes in resultCollectionGenericType, when in fact they do not in the case of a single ICriteria producing multiple loaders. Amusingly(?) there is a member loaderToResultIndex that appears to be designed to track the correct mapping from loaders to indexes in the resultCollectionGenericType list. That member is getting populated, but never read from. My best guess as to the fix is that any instance of "resultCollectionGenericType[i]" where "i" is an index into the loaders list should be replaced with "resultCollectionGenericType[loaderToResultIndex[loaders[i]]]". (I'd file this in Jira with a test case, but the Jira server seems to be down right now) -- You received this message because you are subscribed to the Google Groups "nhusers" group. To view this discussion on the web visit https://groups.google.com/d/msg/nhusers/-/M0d3TXZmNDlZODRK. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
