db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b..@apache.org
Subject cvs commit: db-ojb/src/java/org/apache/ojb/broker/accesslayer/sql TableAliasHandler.java
Date Sun, 22 May 2005 16:04:29 GMT
brj         2005/05/22 09:04:29

  Modified:    src/java/org/apache/ojb/broker/accesslayer/sql
                        TableAliasHandler.java
  Log:
  use outer join hint when building the super-join-tree
  
  Revision  Changes    Path
  1.8       +6 -6      db-ojb/src/java/org/apache/ojb/broker/accesslayer/sql/TableAliasHandler.java
  
  Index: TableAliasHandler.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/accesslayer/sql/TableAliasHandler.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- TableAliasHandler.java	6 Jan 2005 21:00:06 -0000	1.7
  +++ TableAliasHandler.java	22 May 2005 16:04:29 -0000	1.8
  @@ -101,7 +101,7 @@
           }
   
           // Walk the super reference-descriptor
  -        buildSuperJoinTree(m_rootAlias, m_baseCld, "");
  +        buildSuperJoinTree(m_rootAlias, m_baseCld, "", false);
   
           // In some cases it is necessary to split the query criteria
           // and then to generate UNION of several SELECTs
  @@ -412,7 +412,7 @@
   				outer = outer || (curr.cld == prev.cld) || curr.hasExtents() || useOuterJoins;
   				addJoin(prev, prevKeys, curr, keys, outer, attr);
   
  -				buildSuperJoinTree(curr, cld, aPath);
  +				buildSuperJoinTree(curr, cld, aPath, outer);
   			}
   
   			prev = curr;
  @@ -689,7 +689,7 @@
        * @param cld
        * @param name
        */
  -    private void buildSuperJoinTree(TableAlias left, ClassDescriptor cld, String name)
  +    private void buildSuperJoinTree(TableAlias left, ClassDescriptor cld, String name,
boolean useOuterJoin)
       {
           Iterator objRefs = cld.getObjectReferenceDescriptors().iterator();
           while (objRefs.hasNext())
  @@ -705,10 +705,10 @@
                   String aliasName = String.valueOf(getAliasChar()) + m_aliasCount++;
                   TableAlias right = new TableAlias(refCld, aliasName, false, null);
   
  -                Join join1to1 = new Join(left, leftFields, right, refCld.getPkFields(),
false, "superClass");
  +                Join join1to1 = new Join(left, leftFields, right, refCld.getPkFields(),
useOuterJoin, "superClass");
                   base_alias.addJoin(join1to1);
   
  -                buildSuperJoinTree(right, refCld, name);
  +                buildSuperJoinTree(right, refCld, name, useOuterJoin);
               }
           }
       }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message