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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

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

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

Auto Increment on DataObject tables


Go to End


1553 Views

Avatar
riddler

Community Member, 3 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.