Most Commented Query

Vote:
 

Using the latest and greatest episerver cms 6 r2 with episerver community 4.

Are using the circuit dynamic datastore/entity thingy to comment on pages.

Now I want the most commented once.

Simple Query throws exception: -InnerException{"could not resolve property: NumComments of: EPiServer.Common.Comments.Comment [SELECT EPiServerCommonCommentsComment FROM EPiServer.Common.Comments.Comment AS EPiServerCommonCommentsComment    WHERE ((EPiServerCommonCommentsComment.NumComments > :p0))    ]"}System.Exception {NHibernate.QueryException}

 

Code:

var query = new CommentQuery();

query.NumComments = new IntegerCriterion();
query.NumComments.Operator = ComparisonOperator.GreaterThan;
query.NumComments.Value = 0;

var comments = QueryHandler.Instance.GetQueryResult<Comment, CommentCollection>(query);

    

Please advise :-)

#58847
May 08, 2012 22:06
Vote:
 

I have understood based on a separate discussion that finding comments that in turn have at least one comment was not the actual goal.

However. the exception thrown based on the query above has been reported as a bug for further investigation.

#59160
May 23, 2012 11:19
This thread is locked and should be used for reference only. Please use the Legacy add-ons forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.