roller-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guglielmo Carandente" <g.carande...@cnmedia.it>
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 [mailto:anil@busybuddha.org]
Inviato: giovedý 30 ottobre 2008 16.48
A: user@roller.apache.org
Oggetto: Re: R: getMostCommentedWeblogs


Guglielmo,

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 https://issues.apache.org/roller/secure/Dashboard.jspa .

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.

--a.


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
>
> SELECT COUNT(c), c.weblogEntry.website.id, c.weblogEntry.website.handle,
> c.weblogEntry.website.name FROM WeblogEntryComment c WHERE
> c.weblogEntry.pubTime &lt; ?1 AND c.weblogEntry.pubTime &gt; ?2 GROUP BY
> c.weblogEntry.website.id, c.weblogEntry.website.handle,
> c.weblogEntry.website.name order by c.id
>
> But changes don't work.
> I try many changes but nothing....
>
> -----Messaggio originale-----
> Da: Anil Gangolli [mailto:anil@busybuddha.org]
> Inviato: mercoledý 29 ottobre 2008 17.04
> A: user@roller.apache.org
> 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: g.carandente@cnmedia.it
>> www.cnmedia.it
>>
>>
>>
>>
>>
>>
>
>




Mime
View raw message