Return-Path: Delivered-To: apmail-roller-user-archive@www.apache.org Received: (qmail 41803 invoked from network); 31 Oct 2008 11:52:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 31 Oct 2008 11:52:22 -0000 Received: (qmail 86725 invoked by uid 500); 31 Oct 2008 11:52:21 -0000 Delivered-To: apmail-roller-user-archive@roller.apache.org Received: (qmail 86684 invoked by uid 500); 31 Oct 2008 11:52:21 -0000 Mailing-List: contact user-help@roller.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@roller.apache.org Delivered-To: mailing list user@roller.apache.org Received: (qmail 86626 invoked by uid 99); 31 Oct 2008 11:52:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 31 Oct 2008 04:52:20 -0700 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=MSGID_MULTIPLE_AT,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [89.97.190.148] (HELO mail01.cnmedia.local) (89.97.190.148) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 31 Oct 2008 11:51:05 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by mail01.cnmedia.local (Postfix) with ESMTP id 082DF2C704DB for ; Fri, 31 Oct 2008 12:51:14 +0100 (CET) X-Virus-Scanned: amavisd-new at X-Spam-Score: -2.635 X-Spam-Level: Received: from mail01.cnmedia.local ([127.0.0.1]) by localhost (mail01.cnmedia.local [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bT9lQJJtfqAh for ; Fri, 31 Oct 2008 12:51:11 +0100 (CET) Received: from kklab01 (kklab01.cnmedia.local [192.168.102.102]) by mail01.cnmedia.local (Postfix) with ESMTP id 8D9AA2C704D8 for ; Fri, 31 Oct 2008 12:51:11 +0100 (CET) From: "Guglielmo Carandente" To: References: <002201c939bc$840b7cb0$8c227610$@carandente@cnmedia.it> <4908895D.4010704@busybuddha.org> <001b01c93a75$8fe5da80$afb18f80$@carandente@cnmedia.it> <4909D712.9080102@busybuddha.org> In-Reply-To: <4909D712.9080102@busybuddha.org> Subject: R: R: getMostCommentedWeblogs Date: Fri, 31 Oct 2008 12:47:43 +0100 Message-ID: <002201c93b4e$7c93aaf0$75bb00d0$@carandente@cnmedia.it> X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: Ack6puW7KrJiHgKhQTi1BKvsNLVDbQAp3doA Content-Language: it X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Flag: NO X-Old-Spam-Status: No, score=-2.635 tagged_above=-10 required=6.6 tests=[ALL_TRUSTED=-1.8, AWL=0.315, BAYES_00=-2.599, MSGID_MULTIPLE_AT=1.449] 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 < ?1 AND c.weblogEntry.pubTime > ?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 >> >> >> >> >> >> > >