CodeSmith Community
Your Code. Your Way. Faster!

EditableSwitchable bug

Latest post 03-12-2007 5:09 PM by noyceb. 0 replies.
  • 03-12-2007 5:09 PM

    • noyceb
    • Not Ranked
    • Joined on 12-21-2006
    • Denver, CO
    • Posts 2
    • Points 10

    EditableSwitchable bug

    Greetings,

    There is a bug on line 45 of the EditableSwitchable template.  The following line:

     <% string cPars = GetFactoryNewCallArguments(objInfo); %>

    Should be replaced with:

     <% string cPars = GetFactoryDeclarationArguments(objInfo); %>

    The original line will result in erroneous output in the case where an object has an int key (uniqueidentifier works fine), but is not an identity.  The result of the FactoryNewCallArguments will result in a constructor being declared with parameters that have no declaring type:

     private <objectName>(id)
     {
          this._id = id;
     }
     

    The desired result is achieved when using the second (or replacement) method:

     private <objectName>(int id)
     {
          this._id = id;
     }
      

    Cheers.

    • Post Points: 5
Page 1 of 1 (1 items) | RSS
Copyright © 2008 CodeSmith Tools, LLC
Powered by Community Server (Commercial Edition), by Telligent Systems