{"action":"created","issue":{"url":"https://api.github.com/repos/aspnet/EntityFramework/issues/7089","repository_url":"https://api.github.com/repos/aspnet/EntityFramework","labels_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/7089/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/7089/comments","events_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/7089/events","html_url":"https://github.com/aspnet/EntityFramework/issues/7089","id":190856637,"number":7089,"title":"EF Core 1.0 not including columns with default values in insert into query","user":{"login":"mdelprado-emphasys","id":23643989,"avatar_url":"https://avatars.githubusercontent.com/u/23643989?v=3","gravatar_id":"","url":"https://api.github.com/users/mdelprado-emphasys","html_url":"https://github.com/mdelprado-emphasys","followers_url":"https://api.github.com/users/mdelprado-emphasys/followers","following_url":"https://api.github.com/users/mdelprado-emphasys/following{/other_user}","gists_url":"https://api.github.com/users/mdelprado-emphasys/gists{/gist_id}","starred_url":"https://api.github.com/users/mdelprado-emphasys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdelprado-emphasys/subscriptions","organizations_url":"https://api.github.com/users/mdelprado-emphasys/orgs","repos_url":"https://api.github.com/users/mdelprado-emphasys/repos","events_url":"https://api.github.com/users/mdelprado-emphasys/events{/privacy}","received_events_url":"https://api.github.com/users/mdelprado-emphasys/received_events","type":"User","site_admin":false},"labels":[{"id":403964783,"url":"https://api.github.com/repos/aspnet/EntityFramework/labels/closed-duplicate","name":"closed-duplicate","color":"777777","default":false}],"state":"closed","locked":false,"assignee":{"login":"ajcvickers","id":1430078,"avatar_url":"https://avatars.githubusercontent.com/u/1430078?v=3","gravatar_id":"","url":"https://api.github.com/users/ajcvickers","html_url":"https://github.com/ajcvickers","followers_url":"https://api.github.com/users/ajcvickers/followers","following_url":"https://api.github.com/users/ajcvickers/following{/other_user}","gists_url":"https://api.github.com/users/ajcvickers/gists{/gist_id}","starred_url":"https://api.github.com/users/ajcvickers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajcvickers/subscriptions","organizations_url":"https://api.github.com/users/ajcvickers/orgs","repos_url":"https://api.github.com/users/ajcvickers/repos","events_url":"https://api.github.com/users/ajcvickers/events{/privacy}","received_events_url":"https://api.github.com/users/ajcvickers/received_events","type":"User","site_admin":false},"assignees":[{"login":"ajcvickers","id":1430078,"avatar_url":"https://avatars.githubusercontent.com/u/1430078?v=3","gravatar_id":"","url":"https://api.github.com/users/ajcvickers","html_url":"https://github.com/ajcvickers","followers_url":"https://api.github.com/users/ajcvickers/followers","following_url":"https://api.github.com/users/ajcvickers/following{/other_user}","gists_url":"https://api.github.com/users/ajcvickers/gists{/gist_id}","starred_url":"https://api.github.com/users/ajcvickers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajcvickers/subscriptions","organizations_url":"https://api.github.com/users/ajcvickers/orgs","repos_url":"https://api.github.com/users/ajcvickers/repos","events_url":"https://api.github.com/users/ajcvickers/events{/privacy}","received_events_url":"https://api.github.com/users/ajcvickers/received_events","type":"User","site_admin":false}],"milestone":null,"comments":12,"created_at":"2016-11-21T22:39:32Z","updated_at":"2016-11-23T16:05:49Z","closed_at":"2016-11-23T00:22:22Z","body":"### Steps to reproduce\r\nI'm using  EF Core 1.0 and I have a model where I design some properties with default values similar to\r\n`modelBuilder.Entity<Listings>(entity =>\r\n{ entity.Property(e => e.IsActive).HasDefaultValueSql(\"1\");}`\r\nThe table in the database is created correctly defining the columns with the corresponding default value \r\n`[IsActive] bit NOT NULL DEFAULT 1`\r\n\r\n### The issue\r\nWhen I add a new entity and save changes in my context, the insert into statement generated does not contain the properties that have default values even though I assign specific values for those properties. The result in the database is a record where the columns with default values doesn't contain the values I passed in my model. \r\n\r\nMore info on this post \r\nhttp://stackoverflow.com/questions/40619319/entity-framework-not-including-columns-with-default-value-in-insert-into-query/\r\n\r\n### Further technical details\r\n\r\nEF Core version: 1.0\r\nVisual Studio version: VS 2015\r\n"},"comment":{"url":"https://api.github.com/repos/aspnet/EntityFramework/issues/comments/262557226","html_url":"https://github.com/aspnet/EntityFramework/issues/7089#issuecomment-262557226","issue_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/7089","id":262557226,"user":{"login":"gdoron","id":6141009,"avatar_url":"https://avatars.githubusercontent.com/u/6141009?v=3","gravatar_id":"","url":"https://api.github.com/users/gdoron","html_url":"https://github.com/gdoron","followers_url":"https://api.github.com/users/gdoron/followers","following_url":"https://api.github.com/users/gdoron/following{/other_user}","gists_url":"https://api.github.com/users/gdoron/gists{/gist_id}","starred_url":"https://api.github.com/users/gdoron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gdoron/subscriptions","organizations_url":"https://api.github.com/users/gdoron/orgs","repos_url":"https://api.github.com/users/gdoron/repos","events_url":"https://api.github.com/users/gdoron/events{/privacy}","received_events_url":"https://api.github.com/users/gdoron/received_events","type":"User","site_admin":false},"created_at":"2016-11-23T16:05:49Z","updated_at":"2016-11-23T16:05:49Z","body":"@GertArnold It would be very annoying having DateTime? InsertDate all over the place just because people make mistakes.\r\nBut regardless, I believe it's too late for changing as it's a huge breaking change.\r\nMaybe for EF Core Core. 😸 "}}
{"actor":{"display_login":"gdoron"}}