timabell / ef-enum-to-lookup

Generates lookup tables from enum references in Microsoft Entity Framework 6.1
https://www.nuget.org/packages/ef-enum-to-lookup
69 stars 29 forks source link

Error getting schema mappings for entity type - 2 Fragments found #43

Open tboby opened 8 years ago

tboby commented 8 years ago

I'm getting Error getting schema mappings for entity type with an internal exception 2 Fragments found.. Debugging the code it seems like that is literally the issue, although I don't understand the implications. The class referenced doesn't use any enums but does however use two separate calls of Entity.Map( m => { m.ToTable(" ") } to split the properties across two tables.

Removing the fragments exception and taking fragments.FirstOrDefault() seems to generate the correct lookup SQL, but I assume it would break any enums on my fragmented class?

timabell commented 8 years ago

Not one I've seen before, but edmx is a hideous beast with many undocumented layers of doom within so can't say I'm surprised.

Happy to consider pull requests. Make sure you TDD the new code and include the test.

Make sure the PR is on the right branch, master is for v2, and there's a maintenance branch for the v1.x releases

Thanks for filing the issue.