Re: A bug about Group - Bug Reports (Read-Only) - .netTiers - CodeSmith Community
Welcome to the CodeSmith Community!

Re: A bug about Group

.netTiers

A description has not yet been added to this group.

A bug about Group

  • rated by 0 users
  • This post has 5 Replies |
  • 3 Followers
  • Appendxxx called Parameters  and _isDirty = true;

    Parameters called GetParameters   if (_isDirty == true)

    GetParameters called EnsureGroups

    so...

     

      public override SqlFilterBuilder<EntityColumn> AppendNotEquals(String junction, EntityColumn column, String value)
      {
       _isDirty = true;
       Parameters.SetCurrentColumn(column);
       return base.AppendNotEquals(junction, column, value);
      }

     

     

    public virtual SqlFilterParameterCollection Parameters
      {
       get
       {
        if ( parameters == null )
        {
         parameters = new SqlFilterParameterCollection();
        }
        
        if (_isDirty)
         GetParameters();

        return parameters;
       }
       set { parameters = value; }
      }

      

     

    public virtual SqlFilterParameterCollection GetParameters()
      {
         EnsureGroups();
       _isDirty = false;
       Parameters.FilterExpression = this.ToString();
       
       
       return Parameters;
      }

     

    EnsureGroups

  • We are also seeing this undesired behavior in the 08.17.07 CVS nightly.

     A workaround is to make sure all your BeginGroup and EndGroups are properly paired. Then comment out the EnsureGroups logic SqlStringBuilder.cs line 787:

    internal virtual void EnsureGroups()
    {

    //while (_groupCount > 0)
    //{
    // EndGroup();
    //}
    }

  • 2.2.0.691 is what we are running. This bug is apparently still in there. Is there a fix in sight?

     

    Will 

  • I am also wondering if there is a fix for this.

    What's the point of having BeginGroup and EndGroup at all in NetTiers if it doesn't even work?

    I'm outside ur box, shiftin' ur paradigm.
  • Actually, it did work when BeginGroup and EndGroup were first introduced.  At some point down the line, one of the other checkins broke the functionality.  EnsureGroups was just put there to help make sure that each BeginGroup call had a corresponding EndGroup call.  It's not really necessary as long as the developer pairs calls to BeginGroup and EndGroup (which in my opinion they should be doing anyway).

     I went ahead and commented out the functionality in EnsureGroups and committed in SVN 702.

    Ben Johnson
    ------------------------------
     Member of the .NetTiers team
     Visit http://www.nettiers.com
    ------------------------------

  • Thank you :)

    I'm outside ur box, shiftin' ur paradigm.
Page 1 of 1 (6 items)