{"action":"closed","issue":{"url":"https://api.github.com/repos/sjh37/EntityFramework-Reverse-POCO-Code-First-Generator/issues/74","repository_url":"https://api.github.com/repos/sjh37/EntityFramework-Reverse-POCO-Code-First-Generator","labels_url":"https://api.github.com/repos/sjh37/EntityFramework-Reverse-POCO-Code-First-Generator/issues/74/labels{/name}","comments_url":"https://api.github.com/repos/sjh37/EntityFramework-Reverse-POCO-Code-First-Generator/issues/74/comments","events_url":"https://api.github.com/repos/sjh37/EntityFramework-Reverse-POCO-Code-First-Generator/issues/74/events","html_url":"https://github.com/sjh37/EntityFramework-Reverse-POCO-Code-First-Generator/issues/74","id":166286517,"number":74,"title":"Multiple schemas, and tables with FK's referencing across schema","user":{"login":"sjh37","id":4190514,"avatar_url":"https://avatars.githubusercontent.com/u/4190514?v=3","gravatar_id":"","url":"https://api.github.com/users/sjh37","html_url":"https://github.com/sjh37","followers_url":"https://api.github.com/users/sjh37/followers","following_url":"https://api.github.com/users/sjh37/following{/other_user}","gists_url":"https://api.github.com/users/sjh37/gists{/gist_id}","starred_url":"https://api.github.com/users/sjh37/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sjh37/subscriptions","organizations_url":"https://api.github.com/users/sjh37/orgs","repos_url":"https://api.github.com/users/sjh37/repos","events_url":"https://api.github.com/users/sjh37/events{/privacy}","received_events_url":"https://api.github.com/users/sjh37/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/sjh37/EntityFramework-Reverse-POCO-Code-First-Generator/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-19T09:28:14Z","updated_at":"2016-07-19T09:36:03Z","closed_at":"2016-07-19T09:36:03Z","body":"From m woffenden\r\nWe have a database with multiple schemas: DBO and DBX.  \r\nThere are some tables in DBX that are also in DBO.\r\nTo avoid issues with foreign keys, we have added the following to our TT file:\r\n    SchemaFilterExclude = null;\r\n    SchemaFilterInclude = new Regex(\"^dbo$\");\r\n\r\nHowever, we end up with errors because the POCO generator is (incorrectly) including the foreign keys from the DBX schema, resulting in lines such as this that will not compile:\r\n\r\nHasRequired(a => a.person).WithMany(b => b.person_emails).HasForeignKey(c => new { c.person_id, c.person_id }); // FK_person_email\r\n\r\nProof came when we deleted one of the foreign keys in DBX, and sure enough one of the above mentioned issues went away.  \r\n\r\nThe POCO generator should be ignoring anything within DBX."}}
{"actor":{"display_login":"sjh37"}}