This is a guess without seeing any of the exceptions:
 
You (ie., some committer to NH) probably worked around a missing expression 
parser for Queryable.Aggregate in a previous version of re-linq by handling 
the respective MethodCallExpressions in an expression visitor. In the 
current version, re-linq now recognizes the Aggregate methods as query 
operators and converts them into 
AggregateResultOperator/AggregateFromSeedResultOperator instances (similar 
to what it does for all query operators).
 
This means the code previously handling the MethodCallExpressions for 
Queryable.Aggregate should now be rewritten to handle the result operators 
instead.
 
In general, whenever you have a query operator that's not detected by 
re-linq, please don't write code handling the MethodCallExpressions 
directly, but instead add an expression parser (IExpressionNode 
implementation) for that method. This approach has several advantages, among 
others that you avoid breaking your code with later versions of re-linq. See 
my blog post (
https://www.re-motion.org/blogs/mix/archive/2010/10/28/re-linq-extensibility-custom-query-operators.aspx),
 
and post to the re-motion-users mailing list if there are any 
questions/problems (or if re-linq is missing a standard query operator).
 
(Out of curiosity: If I'm guessing correctly, _how_ do you actually 
translate the Aggregate query operator to HQL? After all, the aggregation 
function could contain completely arbitrary code...)
 
Regards,
Fabian

Reply via email to