5 Responses to Code First: What is that EdmMetadata table?

  1. Brian says:

    Maybe I’m just a hopeless geek, but something about just knowing it’s a SHA hash over the SSDL is strangely gratifying. Thank you for sharing what you probably thought was just a mundane bit of trivia…(and keep em’ coming! :)

    • Glad you liked it. Interestingly, the SHA hash over SSDL was a quick way of getting it working, but it has several issues. We end up hashing things that are not directly related to the mapping as well as depending on things like the order of items in the SSDL. A more robust structure would have been better. Unfortunately we didn’t have time to do that before shipping. Luckily once Code First Migrations are released it will remove most of the need for this.

  2. What’s the side effect of removing EDMMetaData table? Does the application continue to run even if the model changes?

    • @Preetham If the EdmMetadata table is removed (and you’re not using Code First Migrations) then there will be nothing checking if the database schema matches the model. The application may or may not run depending on what it does. If the application tries to use the database in a way that depends on the mismatch then it will fail.

      Usually when you remove EdmMetadata you are signing up to ensure the database and the model stay in sync using some other mechanism. This might be Code First Migrations, it might be manually changing the database schema when you change the model, or it might be some other mechanism.

      Thanks,
      Arthur

  3. Pingback: EF 4.3 Beta 1: What happened to that EdmMetadata table? | One Unicorn

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s