"Modifying a column with the 'Identity' pattern is not supported. Column: 'CreatedAt'.

I am using code fist migration and second time I run the service, I got this error.
 "Modifying
a column with the 'Identity'pattern
is not supported. Column:
'CreatedAt'. 
context.Cars.AddOrUpdate(c => c.Id,
new Car { Id = "60B0891B-C3CF-41A6-9BE0-BCCCE5949E6B", Image = "ic_highlander", Name = "Highlander", Description = "4 SEATER, FULL DAY (10 HRS), DOWNTOWN EXCLUDING INDUSTRIAL ZONE, WITH ENGLISH SPEAKING DRIVER", SeatingCapacity = 4, Luggage = 2, Rates = 20000.00M, AirportCode = "YGN" },
new Car { Id = "BAA205B5-C43F-490E-A83B-81F0EBDA2D97", Image = "ic_super_custom", Name = "Super Custom", Description = "4 SEATER, FULL DAY (10 HRS), DOWNTOWN EXCLUDING INDUSTRIAL ZONE, WITH ENGLISH SPEAKING DRIVER", SeatingCapacity = 4, Luggage = 2, Rates = 20000.00M, AirportCode = "YGN" },
new Car { Id = "DD68E56D-3967-4D32-A959-BEFBCB70FC4B", Image = "ic_mark_ii_grande", Name = "MarkII GRANDE", Description = "4 SEATER, FULL DAY (10 HRS), DOWNTOWN EXCLUDING INDUSTRIAL ZONE, WITH ENGLISH SPEAKING DRIVER", SeatingCapacity = 4, Luggage = 2, Rates = 20000.00M, AirportCode = "YGN" },
new Car { Id = "8EDDC308-FB63-469B-8A6A-B2360D61892D", Image = "ic_hiace_commuter_13", Name = "Hiace commuter", Description = "4 SEATER, FULL DAY (10 HRS), DOWNTOWN EXCLUDING INDUSTRIAL ZONE, WITH ENGLISH SPEAKING DRIVER", SeatingCapacity = 4, Luggage = 2, Rates = 20000.00M, AirportCode = "MDL" }

Hi,
Thanks for posting here.
We are looking into this and will update you with solution. Stay tuned for details
Girish Prajwl

Similar Messages

  • How to fix "Modifying a column with the 'Identity' pattern is not supported"

    When doing Code First Migrations my mobile service always errors in the seed method with: 'Modifying a column with the 'Identity' pattern is not supported. Column: 'CreatedAt'. Table: 'CodeFirstDatabaseSchema.Methodology' for the CreatedAt column. All my
    models inherit from EntityData. 
    // Sample model
    using System;
    using System.Collections.Generic;
    using System.ComponentModel.DataAnnotations;
    using Microsoft.WindowsAzure.Mobile.Service;
    namespace sbp_ctService.Models
    public class Methodology : EntityData
    public Methodology()
    this.Scenarioes = new List<Scenario>();
    public string Id { get; set; }
    [Required]
    [StringLength(50)]
    public string EntryMethod { get; set; }
    [Required]
    [StringLength(50)]
    public string TestDirection { get; set; }
    [Required]
    [StringLength(50)]
    public string PassCriteria { get; set; }
    [Required]
    [StringLength(50)]
    public string Dependency { get; set; }
    public bool ExtraInfo { get; set; }
    public virtual ICollection<Scenario> Scenarioes { get; set; }
    And in my Configuration.cs file during an update here's my seed method:
    protected override void Seed(sbp_ctService.Models.sbp_ctContext context)
    // This method will be called after migrating to the latest version.
    context.Methodologies.AddOrUpdate(
    m => m.Id,
    new Methodology { Id = "Methodology1", EntryMethod = "P/F", PassCriteria = "P/F", Dependency = "None", ExtraInfo = false, TestDirection = "Round" },
    new Methodology { Id = "Methodology2", EntryMethod = "P/F", PassCriteria = "Best", Dependency = "None", ExtraInfo = false, TestDirection = "Round" },
    new Methodology { Id = "Methodology3", EntryMethod = "P/F", PassCriteria = "Best", Dependency = "None", ExtraInfo = false, TestDirection = "In/Out" },
    new Methodology { Id = "Methodology4", EntryMethod = "P/F", PassCriteria = "Best", Dependency = "None", ExtraInfo = false, TestDirection = "Out" }
    For some reason on an update the CreatedAt field is created and given a value of null. So of course on an insert/update it will error because CreatedAt is an Identity field.
    I've tried to configure the modelBuilder in my context to tell it that CreatedAt is an identity field, but that still doesn't work.
    modelBuilder.Entity<Methodology>()
    .Property(m => m.CreatedAt)
    .HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);
    So far the only way to fix this is by commenting out my Seed data, but it's not a fix. I've seen other solutions where you can force it to not serialize certain fields, but I don't know if those solutions apply.

    So I think this occurs because you might have created the database (Code-first) with POCOs that didn't have the CreatedAt field in them. I think that's what I did and the easiest way to fix it for me was to delete my database and re-create it with my POCOs
    inheriting from Entity Data from the very beginning. We were still in development so it worked out for us but I know some people might not be able to do that. Here's what my table looks like after it was created correctly:
    USE [database_name]
    GO
    /****** Object: Table [sbp_ct].[Methodologies] Script Date: 2/24/2015 9:48:45 PM ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE TABLE [schema_name].[Methodologies] (
    [Id] NVARCHAR (128) NOT NULL,
    [EntryMethod] NVARCHAR (50) NOT NULL,
    [TestDirection] NVARCHAR (50) NOT NULL,
    [PassCriteria] NVARCHAR (50) NOT NULL,
    [Dependency] NVARCHAR (50) NOT NULL,
    [ExtraInfo] BIT NOT NULL,
    [Version] ROWVERSION NOT NULL,
    [CreatedAt] DATETIMEOFFSET (7) NULL,
    [UpdatedAt] DATETIMEOFFSET (7) NULL,
    [Deleted] BIT NOT NULL,
    [Name] NVARCHAR (MAX) NULL
    GO
    CREATE CLUSTERED INDEX [IX_CreatedAt]
    ON [schema_name].[Methodologies]([CreatedAt] ASC);
    GO
    ALTER TABLE [schema_name].[Methodologies]
    ADD CONSTRAINT [PK_schema_name.Methodologies] PRIMARY KEY NONCLUSTERED ([Id] ASC);
    Does yours look something like that?

  • Error in CodeFirst Seed with migrations : Modifying a column with the 'Identity' pattern is not supported. Column: 'CreatedAt'. Table: 'CodeFirstDatabaseSchema.Category'.

    Hi,
    I have activated migrations on my Azure Mobile Services project. I filled the new seed function Inside the Configuration.cs class of the migrations. If the tables are empty, the seed function is going without any problems. When my AddorUpdate tries to update
    the first object I get the error in the inner exception : "Modifying a column with the 'Identity' pattern is not supported. Column: 'CreatedAt'. Table: 'CodeFirstDatabaseSchema.Category'."
    Part of my code is as follows:
    context.categories.AddOrUpdate(
    new Category { Id="1", Code="GEN", Text="General"},
    new Category { Id="2", Code="POL", Text="Politics"},
    new Category { Id="3", Code="FAS", Text="Fashion"},
    new Category { Id="4", Code="PEO", Text="People"},
    new Category { Id="5", Code="TEC", Text="Technology"},
    new Category { Id="6", Code="SPO", Text="Sport"},
    new Category { Id="7", Code="LIV", Text="Living"}
    Any help is welcomed. Thanks.
    Faical SAID Highwave Creations

    This occurred to me because I changed my POCO models to inherit from EntityData after I had already created my database without the extra Azure Mobile Service properties (UpdatedAt, CreatedAt, Deleted). The only way I fixed it was to drop the database and
    start over with my classes inheriting from EntityData from the beginning. If you can't do that then I would create a new table with EntityData models and see how that database is created and manually update your tables to match those. Here's an image of one
    of my tables from the management console on Azure. You can see that CreatedAt is an index.

  • "there was a problem connecting to the server. URLS with the type 'file' are not supported"

    i have a new macbook pro 13" and every 6 minutes or so it pops up a window that says "there was a problem connecting to the server. URLS with the type 'file' are not supported". it never seems to cause any problems but is supremely annoying. how can i make this come to an end?

    I tried someone's solution of taking another external disc and plugging it in, then when it showed up and time machine asked if I wanted to use it or that someone might be trying to trick me, I chose not use it.  Then I  shut down my computer, plugged in the original Lacie, and rebooted the computer and all seems to work fine now-- the Lacie appears on my desktop and all seeems to be in working order. Who knows why or anything else,- as weird as it gets- but for now things seemed fixed--- maybe others can try this too-- it worked for me so far.

  • "There was a problem connecting to the server.   URLs with the type "file:" are not supported.  Why?  What can be done to eliminate it?

    After upgrading to Mountain Lion, I repeatedly get this message:  "There was a problem connecting to the server.   URLs with the type "file:" are not supported. 
    Why? 
    What can be done to eliminate it?

    Open the Time Machine pane in System Preferences. If it shows that Time Machine is ON, click the padlock icon in the lower left corner, if necessary, to unlock it. Scroll to the bottom of the list of backup drives and click Add or Remove Backup Disk. Remove all the disks, then add them back. Quit System Preferences. Test.

  • Message - There was a problem connecting to the server. URLs with the type "file:" are not supported

    new macbook pro receving this message: There was a problem connecting to the server. URLs with the type "file:" are not supported. What is causing this and how do

    Open the Time Machine pane in System Preferences. If it shows that Time Machine is ON, click the padlock icon in the lower left corner, if necessary, to unlock it. Scroll to the bottom of the list of backup drives and click Add or Remove Backup Disk. Remove all the disks, then add them back. Quit System Preferences. Test.

  • There was a problem connecting to the server. URLs with the type "file:" are not supported. OK

    I have just upgraded to Mountain Lion from Leopard, but now I keep getting this message when I open some web-pages and every time I wake the Mac up after going to sleep. For some odd reason I get it in Swedish sometimes (installed language) and some times in English...
    There was a problem connecting to the server.
    URLs with the type "file:" are not supported.
    OK
    What is this and how can I get rid of it. I use Firefox and have updated to latest version.

    Open the Time Machine pane in System Preferences. If it shows that Time Machine is ON, click the padlock icon in the lower left corner, if necessary, to unlock it. Scroll to the bottom of the list of backup drives and click Add or Remove Backup Disk. Remove all the disks, then add them back. Quit System Preferences. Test.

  • Since installing Lion I keep getting the error message 'there was a problem connecting to the server. URLs with the type 'file:" are not supported"' How can I fix this?

    since installing Lion I keep getting the error message 'there was a problem connecting to the server. URLs with the type 'file:" are not supported"' How can I fix this?

    A Davey1 wrote:
    Not a nice answer!
    Posting "Check the 'More like this'" area and not simply providing the answer is a great way to make these groups worthless.
    You're ignoring context.  On the old Apple Discussion Groups I never posted replies like that, instead giving people relatively detailed answers.  The new Apple Support Communities made things worse by introducing certain inefficiencies.  Then came Lion.  The flood of messages that came with Lion required a painful choice for any of the people who had been helping here: (1) Give quality responses to a few questions and ignore the rest.  (2) When applicable, give a brief answer such as the one that you found objectionable.  (3) Give up all the other normal activities of life and spend full time trying to answer questions here.
    People who needed help with Lion problems seemed to have trouble discovering existing message threads that described how to solve their problems.  I never posted the suggestion of "Check the 'More like this' area" without verifying that the help that the poster needed could be found there.  Even doing that, what I posted saved me time that I could use to help someone else.
    The people helping here are all volunteers.  None of them is being paid for the time they spend here.  They all have a life outside of Apple Support Communities.  It's arrogant of you to demand that people helping here spend more time than they already do.

  • I'm being shown an error pop-up message periodically saying "There was a problem connecting to the server. URLs with the type 'file:' are not supported." I have a brand new MacBook Pro, and at no time am I actually having trouble connecting to the server.

    I'm being shown an error pop-up message periodically saying "There was a problem connecting to the server. URLs with the type 'file:' are not supported." I have a brand new MacBook Pro, and at no time am I actually having trouble connecting to the server, but this message continues to pop-up several times a day at random intervals. Is there something I'm doing wrong? Or is my computer just having a glitch? Other than that, and a mildly sticking caps lock button, it's working perfectly.
    Thank you!

    Alright it didn't solve it. Any other suggestions?
    I haven't suggested a solution yet. I want to know whether you still get the messages while Time Machine is disabled. Do you? If so, try any or all of the solutions proposed in this thread:
    There was a Problem connecting to the...: Apple Support Communities

  • I keep getting an error message saying "There was a problem connecting to the server.  URLs with the type "file:" are not supported."  Can someone help me get rid of it.

    I keep getting an error message saying "There was a problem connecting to the server.  URLs with the type "file:" are not supported"  Can someone help me locate and get rid of this error.

    Open the Time Machine pane in System Preferences. If it shows that Time Machine is ON, click the padlock icon in the lower left corner, if necessary, to unlock it. Scroll to the bottom of the list of backup drives and click Add or Remove Backup Disk. Remove all the disks, then add them back. Quit System Preferences. Test.

  • My Mac suddenly started getting a pop up message saying "There was a problem conecting to the server. URLs with the type "file" are not supported." My internet is working fine,no problem connecting. I just keep getting this message which I click off .

    My Mac suddenly started getting a pop up message saying "There was a problem conecting to the server. URLs with the type "file" are not supported." My internet is working fine,no problem connecting. I just keep getting this message which I click off and continue working.

    Open the Time Machine pane in System Preferences. If it shows that Time Machine is ON, click the padlock icon in the lower left corner, if necessary, to unlock it. Scroll to the bottom of the list of backup drives and click Add or Remove Backup Disk. Remove all the disks, then add them back. Quit System Preferences. Test.

  • Since updating to mountain line, error message "There was a problem connecting to the server. URLs with the type "file:" are not supported" keeps popping up

    Since updating to Mountain Lion in the last week, an error message keeps popping up. The graphic is the button with 3 stick men holding hands and the message is "There was a problem connecting to the server. URLs with the type "file:" are not supported". Any solutions found?

    Open the Time Machine pane in System Preferences. If it shows that Time Machine is ON, click the padlock icon in the lower left corner, if necessary, to unlock it. Scroll to the bottom of the list of backup drives and click Add or Remove Backup Disk. Remove all the disks, then add them back. Quit System Preferences. Test.

  • After loading lion, I get an error message "There was a problem connecting with the server.  URL's with the type "file" are not supported."

    After loading Lion, I have been getting an error message "There was a problem connecting to the server.  URLs with the type "file:" are not supported."  There does not seem to be any actual problem with internet connectivity, but it is persistent and annoying.  Any idea of its cause and treatment?

    Take a look at this link, https://discussions.apple.com/message/16156214#16156214

  • Error message: URL's with the type "file:" are not supported.  I get this pop-up twice each time I enter Safari and Mail.

    Everytime I go into Mail and/or Safari, I receive a pop-up the states "There was a problem connecting to the server.  URL's with the type "File:" are not supported.  The pop-up comes up twice each time and I have to click "ok" to close them.  Only started after install of OS Lion 10.7.  Any one else have this and is there a solution.  It is just plain irrating that is does this each time I check my mail or go on the internet.  Thanks!

    That's interesting. I bet that helps other Safari users! 

  • How can I get my stereo to play music videos from my Ipod Nano?  It comes up with the message "This device not supported".  Strangely my Iphone IS recognised.  The stereo, Ipod, and Iphone are less than 4 months old. Any suggestions welcome!

    How do I get my Ipod to play music videos through my theatre system?  I keep getting the message "This device not supported".  My theatre system WILL recognise my Iphone however.  The theatre system, Ipod, and Iphone are all less than 4 months old.  Any suggestions welcome!

    Check with the theater system vendor and see if their system is compatible with the Nano. The resolution on the Nano may be too low for the system.

Maybe you are looking for

  • ERROR while compiling the demo LoanDemoPlus

    Hello, I have a problem while trying to install one of the Bpel demos. While compiling the demo LoanDemoPlus using obant, the following errors occured : (see the transcript below) How to fix this problem, please ? [bpelc] validating "C:\DAS\DAS_BPEL\

  • Layout in Report: User Specific Indicator

    Hi Friends, I want to remove the "user Specific" Indicator from my layout and make it global but this indicator is in display mode. How can i do it? Please advice. Regards, CK

  • Need help creating creating a webservice as per the documentation

    I'm trying to setup a webservice with reliable messaging using the NWDS. I'm trying to follow the example given in http://help.sap.com/saphelp_nw72/helpdata/en/46/741a3dfcfa0eede10000000a155369/content.htm I'm not familiar with J2EE development, so I

  • Ralink (Mediatek) Bluetooth PCIe Adapter for Windows 8.1 driver missing

     plz send me solution ralink Bluetooth PCIe Adapter for Windows 8.1 driver missing 

  • Preserve Manual Overrides

    Hi All, I have a script which find  all the paragraph styles in myFind Array and change all the paragraph styles as per in the name of myChange Array. Request: Changing Paragraphs Styles without clear overrides or preserve local overrides like manual