ROWGUID bug RRS feed

  • General discussion

  • When a ROWGUID is set to autogenerate and to retrieve its value on insert, it attempts to retrieve the Guid column with the property name not the column name.

    I have a DB table with a Guid called ConfirmationID in the DB and just Id in the code. 
    I have AutoGenerated set to true,   Auto-sync set to OnInsert, Name is Id, Source = ConfirmationID.

    This is the SQL generated
    DECLARE @output TABLE([Id] UniqueIdentifier)
    INSERT INTO [Confirmations]([AuthorizeTransactionID])
    VALUES ('5f98eea8-ce01-4a45-88b1-b3b88202017a');
    SELECT [Id] FROM @output;

    As you can see it put Id where it should've put ConfirmationID.

    Don't be confused by the fact that AuthorizeTransactionID is also a Guid.  It's just the other field in the table in addition to a CreatedAt and UpdatedAt that ive left out here.

    This bug is very easy to reproduce.

    It does not affect autoincrement identity columns.
    Wednesday, June 4, 2008 12:20 AM

All replies

  • I am able to regenerate it, I'll vote for it if you post it on connect Smile


    Wednesday, June 4, 2008 9:59 AM
  • This is a known bug and has been addressed in a recent build; however, it will not be available in SP1.







    Wednesday, June 4, 2008 6:29 PM