[jboss-cvs] jboss-seam/examples/wiki/src/main/org/jboss/seam/wiki/plugin/blogdirectory ...

Christian Bauer christian at hibernate.org
Sat Aug 25 15:03:39 EDT 2007


  User: cbauer  
  Date: 07/08/25 15:03:39

  Modified:    examples/wiki/src/main/org/jboss/seam/wiki/plugin/blogdirectory 
                        BlogDAO.java
  Log:
  Minor bug when adding the plugin to an unsaved document
  
  Revision  Changes    Path
  1.2       +4 -3      jboss-seam/examples/wiki/src/main/org/jboss/seam/wiki/plugin/blogdirectory/BlogDAO.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: BlogDAO.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/examples/wiki/src/main/org/jboss/seam/wiki/plugin/blogdirectory/BlogDAO.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -b -r1.1 -r1.2
  --- BlogDAO.java	25 Aug 2007 17:59:21 -0000	1.1
  +++ BlogDAO.java	25 Aug 2007 19:03:39 -0000	1.2
  @@ -104,6 +104,7 @@
           queryString.append("and n1.nsLeft between n2.nsLeft and n2.nsRight").append(" ");
           queryString.append("and n2.nsLeft > :startLeft and n2.nsRight < :startRight").append(" ");
           queryString.append("and n2.class = :clazz").append(" ");
  +        if (ignoreNode.getId() != null)
           queryString.append("and not n1 = :ignoreNode").append(" ");
   
           if (limitYear != null) queryString.append("and year(n1.createdOn) = :limitYear").append(" ");
  @@ -127,8 +128,8 @@
           nestedSetQuery.setParameter("startLeft", startNode.getNsLeft());
           nestedSetQuery.setParameter("startRight", startNode.getNsRight());
           nestedSetQuery.setParameter("clazz", "DOCUMENT"); // TODO: Hibernate can't bind the discriminator? Not even with Hibernate.CLASS type...
  +        if (ignoreNode.getId() != null)
           nestedSetQuery.setParameter("ignoreNode", ignoreNode);
  -
           if (limitYear != null) nestedSetQuery.setParameter("limitYear", limitYear);
           if (limitMonth!= null) nestedSetQuery.setParameter("limitMonth", limitMonth);
           if (limitDay != null) nestedSetQuery.setParameter("limitDay", limitDay);
  
  
  



More information about the jboss-cvs-commits mailing list