Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #2930 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

[PATCH] Add support for SQL Server uniqueidentifier columns

Reported by: keithm@infused.org Assigned to: rtomayko@gmail.com
Priority: normal Milestone: 1.0
Component: ActiveRecord Version: 0.14.3
Severity: normal Keywords: sqlserver
Cc:

Description

The SQL Server adapter does not recognize the uniqueidentifier column type. This patch casts uniqueidentifier to a string type. I can't think of any better way to handle this column type.

Attachments

cast_uniqueidentifier_to_string.diff (0.7 kB) - added by keithm@infused.org on 11/18/05 00:27:05.

Change History

11/18/05 00:27:05 changed by keithm@infused.org

  • attachment cast_uniqueidentifier_to_string.diff added.

11/18/05 07:31:27 changed by bitsweat

  • keywords set to sqlserver.
  • owner changed from David to rtomayko@gmail.com.
  • milestone set to 1.1.

11/20/05 03:53:36 changed by rtomayko@gmail.com

Can someone point me to any doc or discussion on when/where this column type is used. Is it for primary key fields? GUID style unique fields? Is the data contained in the field expected to be populated by the database or is it provided by Rails?

Thanks.

11/20/05 04:46:03 changed by keithm@infused.org

Here's a good explaination:

http://www.sqlteam.com/item.asp?ItemID=283

12/09/05 20:27:23 changed by rtomayko@gmail.com

  • milestone changed from 1.1 to 1.0.

This is a real simple fix. I'm going to try to push into a 1.0 roll-up patch.

12/10/05 00:52:44 changed by bitsweat

  • status changed from new to closed.
  • resolution set to fixed.

(In [3270]) SQLServer: fix obscure optimistic locking bug, support uniqueidentifier columns, cope with tables names qualified by owner, cope with columns with desc in the name, cope with primary keys with select in the name. Closes #3068, #2930, #3067, #1950, #3057, #3162.