roller-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guglielmo Carandente" <>
Subject R: R: getMostCommentedWeblogs
Date Fri, 31 Oct 2008 11:47:43 GMT
Thanks Anil your solution works... in Italian we call this "pezzotto" :-)
thanks a lot :-)

-----Messaggio originale-----
Da: Anil Gangolli []
Inviato: giovedý 30 ottobre 2008 16.48
Oggetto: Re: R: getMostCommentedWeblogs


I looked at the code and I believe there is a bug here if you call with
a length limit value other than -1.  I suggest that you file a JIRA
issue at .

The query itself does not do any ordering because of a restriction in
JPA QL, but if you pass a length the query result set is limited.  The
ordering is done by sorting the results in the Java code within the
method WeblogEntryManager.getMostCommentedWeblogEntries().   The bug
results if you limit of the result set, it may not contain the most
commented entries.

To work around this bug, if you have a small to moderate number of blogs
on the whole site, you can try passing -1 for the length limit and then
limiting the number of results you actually display in your velocity
template.  Depending on how often this is called and how many blogs you
have, this workaround may or may not perform acceptably.


Guglielmo Carandente wrote:
> I'm Using Roller 4.0 with MySql 5.0. I call this method without
> modification, how in explained in roller themes guide.
> I think there isn't order by in this query in file
> WeblogEntryComment.orm.xml
> FROM WeblogEntryComment c WHERE
> c.weblogEntry.pubTime &lt; ?1 AND c.weblogEntry.pubTime &gt; ?2 GROUP BY
> order by
> But changes don't work.
> I try many changes but nothing....
> -----Messaggio originale-----
> Da: Anil Gangolli []
> Inviato: mercoledý 29 ottobre 2008 17.04
> A:
> Oggetto: Re: getMostCommentedWeblogs
> Can you please provide more details?
> Which Roller version are you using?
> Have you made any of your own modifications to the code for this call?
> Which JDBC driver are you using?
> What database type and version are you using?
> --a.
> Guglielmo Carandente wrote:
>> I have problem with getMostCommentedWeblogs, in your blog it works fine?
> My
>> lyst is not ordered and there isn't most commented.
>> Someone can help me?
>> Guglielmo Carandente
>> Junior Software Developer
>> cell: 3383567746
>> mail:

View raw message