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 SqlQueryStatement.java
Date Sat, 27 Mar 2004 20:57:23 GMT
brj         2004/03/27 12:57:23

  Modified:    src/java/org/apache/ojb/broker/accesslayer/sql
                        SqlQueryStatement.java
  Log:
  fixed bug OJB247: handling of SqlCriteria
  
  Revision  Changes    Path
  1.70      +15 -1     db-ojb/src/java/org/apache/ojb/broker/accesslayer/sql/SqlQueryStatement.java
  
  Index: SqlQueryStatement.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/accesslayer/sql/SqlQueryStatement.java,v
  retrieving revision 1.69
  retrieving revision 1.70
  diff -u -r1.69 -r1.70
  --- SqlQueryStatement.java	20 Mar 2004 13:41:51 -0000	1.69
  +++ SqlQueryStatement.java	27 Mar 2004 20:57:23 -0000	1.70
  @@ -803,6 +803,13 @@
        */
       protected void appendSQLClause(SelectionCriteria c, StringBuffer buf)
       {
  +        // BRJ : handle SqlCriteria
  +        if (c instanceof SqlCriteria)
  +        {
  +            buf.append(c.getAttribute());
  +            return;
  +        }
  +        
           // BRJ : criteria attribute is a query
           if (c.getAttribute() instanceof Query)
           {
  @@ -1532,6 +1539,13 @@
               else
               {
                   SelectionCriteria c = (SelectionCriteria) o;
  +                
  +                // BRJ skip SqlCriteria
  +                if (c instanceof SqlCriteria)
  +                {
  +                    continue;
  +                }
  +                
                   // BRJ: Outer join for OR
                   boolean useOuterJoin = (crit.getType() == Criteria.OR);
   
  
  
  

---------------------------------------------------------------------
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