Thanks to all. This is working fine by now.

Edson Richter
  ----- Original Message ----- 
  From: Kurt R. Hoehn 
  To: [EMAIL PROTECTED] 
  Sent: Friday, September 05, 2003 3:40 PM
  Subject: Re: upgrade from rc3 to CVS Head rc4 doesn't work


  In that same method you may also want to do the following

  you should check to see if aTableAlias has joins before trying to get the
  iterator.

  if(!fld.getClassDescriptor().getFullTableName().equals( aTableAlias.table)
          && aTableAlias.hasJoins() )
  {
      Iterator itr = aTableAlias.joins.iterator();
      while( itr.hasNext() )
      {
          Join join = (Join) itr.next();
          
          // This needs to be changed also to
          // join.right.table.equals(fld.getClassDescriptor().getFullTableName())
         
          if( join.right.table == fld.getClassDescriptor().getFullTableName() )
          {
              result = join.right.alias + "." + fld.getColumnName();
              break;
          }
      }

      if( result == null )
      {
          result = aPathInfo.column;
      }
  }

  -kurt


  On Fri, 05 Sep 2003 18:59:14 +0200, Armin Waibel wrote:

  > Hi Edson,
  > 
  > think you are right, the first statement doesn't
  > make sense.
  > I checked in your changes. Thanks!!
  > 
  > regards,
  > Armin
  > 
  > ----- Original Message -----
  > From: "Edson Carlos Ericksson Richter"
  > <[EMAIL PROTECTED]>
  > To: "OJB Users List" <[EMAIL PROTECTED]>
  > Sent: Friday, September 05, 2003 4:30 PM
  > Subject: Re: upgrade from rc3 to CVS Head rc4 doesn't work
  > 
  > 
  > I've discovered the problem. The error is related to
  > 
  >                 if( fld.getClassDescriptor().getFullTableName() !=
  > aTableAlias.table )
  > 
  > It should not be
  > 
  >                 if( !
  > fld.getClassDescriptor().getFullTableName().equals( aTableAlias.table ) 
  > )
  > 
  > ???
  > 
  > Thanks,
  > 
  > Edson Richter
  > 
  >   ----- Original Message -----
  >   From: Edson Carlos Ericksson Richter
  >   To: OJB Users List
  >   Sent: Friday, September 05, 2003 10:59 AM
  >   Subject: Re: upgrade from rc3 to CVS Head rc4 doesn't work
  > 
  > 
  >   Ok, let's go. My app is working for month on top of rc3 (with some bug
  > fixes - I am using a CVS Head until 1.0 final doesnt came to us, the
  > mortals).
  > 
  >   Yesterday I've downloaded rc4 and noticed changes in OJB.properties
  > and DTD.
  >   I've adjusted the new OJB.properties to my app (I'm using beans with
  > formal getters/setters), and DBCP impl for connections.
  > 
  >   But I've discovered a (bug?) problem in SqlSelecteStatement. Debugging
  > I came to (SqlQueryStatement)
  > 
  >    protected String getColName(TableAlias aTableAlias, PathInfo
  > aPathInfo, boolean translate)
  >   ...
  >      if (fld != null)
  >      {
  >                   // added to suport the super reference descriptor
  >                   if( fld.getClassDescriptor().getFullTableName() !=
  > aTableAlias.table )
  >                   {
  >                       Iterator itr = aTableAlias.joins.iterator();
  >                       while( itr.hasNext() )
  >                       {
  >                           Join join = (Join) itr.next();
  >                           if( join.right.table ==
  > fld.getClassDescriptor().getFullTableName() )
  >                           {
  >                               result = join.right.alias + "." +
  > fld.getColumnName();
  >                               break;
  >                           }
  >                       }
  > 
  >                       if( result == null )
  >                       {
  >                           result = aPathInfo.column;
  >                       }
  >                   }
  >                   else
  >                   {
  >           result = aTableAlias.alias + "." + fld.getColumnName();
  >                   }
  >      }
  > 
  > 
  >   But what happens if aTableAlias has no joins? The line
  > 
  >   Iterator itr = aTableAlias.joins.iterator();
  > 
  >   Will thrown a NullPointerException (what I'm having).
  >   Could someone confirm this?
  > 
  > 
  >   Thanks,
  > 
  >   Edson Richter
  > 
  > 
  > 
  > 
  >   ---
  >   Outgoing mail is certified Virus Free.
  >   Checked by AVG anti-virus system (http://www.grisoft.com).
  >   Version: 6.0.515 / Virus Database: 313 - Release Date: 1/9/2003



  ---------------------------------------------------------------------
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]



  ---
  Outgoing mail is certified Virus Free.
  Checked by AVG anti-virus system (http://www.grisoft.com).
  Version: 6.0.515 / Virus Database: 313 - Release Date: 1/9/2003

Reply via email to