None of the above. I didn't reply because I don't know the answer. I suspect that's the case with most of the regular support volunteers.
On Sat, Aug 21, 2010 at 11:54 AM, rsr <[email protected]> wrote: > Posted this about a month ago. Have received no replies. > Is it because nobody cares about this issue, or nobody reads this > list, or did I post it inappropriately somehow? > Still curious... > > On Jul 18, 8:28 am, rsr <[email protected]> wrote: > > Using 2.1.2.ga - > > I found a case where enabling the query cache on a query where a > > result transformer is used causes an error: > > System.Reflection.TargetException : Object does not match target > > type. > > way down in .BasicPropertyAccessor.BasicGetter.Get > > > > You can demonstrate this easily by modifying the test > > CachedQueriesHandlesEntitiesParametersCorrectly and adding > > .SetResultTransformer(new DistinctRootEntityResultTransformer()) > > to the query. > > > > The problem is that we're calling > > ForeignKeys.GetEntityIdentifierIfNotUnsaved and passing it the row > > values while still in tuple form - an object[] where object[0] is the > > entity. > > > > My solution was to add the following to > > ForeignKeys.GetEntityIdentifierIfNotUnsaved: > > > > // When query cache + result transform is used, the > > "entity" given here is still in > > // tuple form. In the cases I've seen, at least, the > > entity is the first item of a > > // one item object array. If that is the case, extract > > it here. > > var entityAsTuple = entity as object[]; > > if (entityAsTuple != null && entityAsTuple.Length == > > 1) > > entity = entityAsTuple[0]; > > > > and with this, the modified > > CachedQueriesHandlesEntitiesParametersCorrectly passes, along with all > > other tests in the test project. > > > > My question is - is this correct/sufficient? > > Is there a better fix, maybe that has already been made somewhere? > > > > Thanks > > -- > You received this message because you are subscribed to the Google Groups > "nhusers" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<nhusers%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/nhusers?hl=en. > > -- You received this message because you are subscribed to the Google Groups "nhusers" group. 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.
