Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Auto Increment on DataObject tables


Reply


298 Views

Avatar
riddler

Community Member, 2 Posts

11 June 2013 at 7:54pm

Is there a reason child DataObjects have auto increment set on the ID field? These get set from the ID in base table which is auto incrementing.

The reason I bring it up, is that I converted a MySQL database so to an SQL Server database, I ran into issues with the MySQL to SQL Server Migration tool provided by Microsoft setting the Is Identity to true for the ID fields, which caused issues when creating records as it couldn't insert on the ID field.

As I can't find a way to bulk update these, I have to do it manually with the GUI, fun...

Haven't had a chance to test it yet, but I'm guessing the auto_increment fields get converted to Identities.