SubSonic-2.0 icon indicating copy to clipboard operation
SubSonic-2.0 copied to clipboard

Scaffold control broken for tables with GUID (uniqueidentifier) primary keys.

Open bishfoo opened this issue 15 years ago • 0 comments

Environment:

  • SubSonic 2.2
  • Visual Studio .NET 2005
  • SQL Server 2000

Sample Table (called 'Sample')

  • SampleID, type=uniqueidentifier, Primary Key
  • SampleName, type=varchar, size=25

Setup Scaffold Control:

  1. Create a new page (e.g. Sample.aspx).
  2. Add the scaffold control to the page. (e.g. <ss:Scaffold id="scaffold" runat="server"/>
  3. Set the Mode (ScaffoldMode?) property to 'Automatic'.
  4. Set the TableName property to 'Sample'.

Reproduce The Error:

  1. Open the page with the scaffold control.
  2. Select the sample table from the table list.
  3. Click the 'Add' button. Note: The 'Add' screen only has a text box for the 'SampleName' field/column.
  4. Enter some text in the 'SampleName' text box.
  5. Click the 'Save' button.
  • An exception is throw complaining about entering a NULL value into the 'SampleID' column.

When I Googled this issue I found references to a couple of 'resolved' work items, but all of the links to the original issues were broken - probably lost when subsonic was moved to github.

I would greatly appreciate any help with this problem.

bishfoo avatar Feb 14 '10 01:02 bishfoo