roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agillil...@apache.org
Subject svn commit: r470523 - /incubator/roller/branches/roller_3.1/src/org/apache/roller/business/hibernate/HibernateUserManagerImpl.java
Date Thu, 02 Nov 2006 21:08:35 GMT
Author: agilliland
Date: Thu Nov  2 13:08:34 2006
New Revision: 470523

URL: http://svn.apache.org/viewvc?view=rev&rev=470523
Log:
merging changes from trunk between revisions 470479 and 470519 which fixes bug in removing
weblogs.


Modified:
    incubator/roller/branches/roller_3.1/src/org/apache/roller/business/hibernate/HibernateUserManagerImpl.java

Modified: incubator/roller/branches/roller_3.1/src/org/apache/roller/business/hibernate/HibernateUserManagerImpl.java
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_3.1/src/org/apache/roller/business/hibernate/HibernateUserManagerImpl.java?view=diff&rev=470523&r1=470522&r2=470523
==============================================================================
--- incubator/roller/branches/roller_3.1/src/org/apache/roller/business/hibernate/HibernateUserManagerImpl.java
(original)
+++ incubator/roller/branches/roller_3.1/src/org/apache/roller/business/hibernate/HibernateUserManagerImpl.java
Thu Nov  2 13:08:34 2006
@@ -114,7 +114,7 @@
         
         // remove tags
         Criteria tagQuery = session.createCriteria(WeblogEntryTagData.class)
-            .add(Expression.eq("website.id", website.getId()));
+            .add(Expression.eq("weblog.id", website.getId()));
         for(Iterator iter = tagQuery.list().iterator(); iter.hasNext();) {
             WeblogEntryTagData tagData = (WeblogEntryTagData) iter.next();
             this.strategy.remove(tagData);
@@ -124,14 +124,14 @@
         List tags = wmgr.getTags(website, null, null, -1);
         for(Iterator iter = tags.iterator(); iter.hasNext();) {
             TagStat stat = (TagStat) iter.next();
-            Query query = session.createQuery("update WeblogEntryTagAggregateData set total
= total - ? where name = ? and website is null");
+            Query query = session.createQuery("update WeblogEntryTagAggregateData set total
= total - ? where name = ? and weblog is null");
             query.setParameter(0, new Integer(stat.getCount()));
             query.setParameter(1, stat.getName());
             query.executeUpdate();
         }
         
         // delete all weblog tag aggregates
-        session.createQuery("delete from WeblogEntryTagAggregateData where website = ?")
+        session.createQuery("delete from WeblogEntryTagAggregateData where weblog = ?")
             .setParameter(0, website).executeUpdate();
         
         // delete all bad counts



Mime
View raw message