CodeSmith Community
Your Code. Your Way. Faster!

Equals method and Byte values

Latest post 12-11-2006 7:08 PM by JJmartin. 0 replies.
  • 12-11-2006 7:08 PM

    • JJmartin
    • Top 25 Contributor
    • Joined on 05-22-2006
    • Phoenix, AZ
    • Posts 164
    • Points 3,275

    the Equals method fails if you have a binary field on your table.  It checks equality but because Byte arrays are reference types, the equality on them won't work if the objects were generated separately (it works on the clone because they end up being set to the same array (which may be another bug as changes to one byte array would affect the other object....)

    Included is a patch that alters the EntityInstanceBase.generated.cst to check for the field being of type Byte[] and then doing an array VALUE comparison.

     

    -Jeff Martin C# MCSD
    Filed under: ,
    • Post Points: 5
Page 1 of 1 (1 items) | RSS
Copyright © 2008 CodeSmith Tools, LLC
Powered by Community Server (Commercial Edition), by Telligent Systems