Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Breaks with inherited types #18

Closed
makani opened this issue Feb 12, 2015 · 6 comments
Closed

Breaks with inherited types #18

makani opened this issue Feb 12, 2015 · 6 comments
Labels

Comments

@makani
Copy link

makani commented Feb 12, 2015

Throws "Error getting table name for entity type" when using default inheritance strategy in entity framework of table per hierarchy. So if you have a Bed class and Chair class both inherit from Furniture and EF stores the data for both in table named Furniture. It errors when looking for tables Bed and Chair.

@timabell
Copy link
Owner

Thanks for the info, I'll take a look. Can't promise when it'll be.

@timabell
Copy link
Owner

kaboom

EfEnumToLookup.LookupGenerator.EnumGeneratorException was unhandled by user code
  HResult=-2146233088
  Message=Error getting table name for entity type 'Furniture'
  Source=EfEnumToLookup
  StackTrace:
       at EfEnumToLookup.LookupGenerator.EnumToLookup.GetTableName(MetadataWorkspace metadata, EntityType entityType) in c:\repo\ef-enum-to-lookup\EfEnumToLookup\LookupGenerator\EnumToLookup.cs:line 298
       at EfEnumToLookup.LookupGenerator.EnumToLookup.<>c__DisplayClass10.<FindReferences>b__c(<>f__AnonymousType0`2 <>h__TransparentIdentifier7) in c:\repo\ef-enum-to-lookup\EfEnumToLookup\LookupGenerator\EnumToLookup.cs:line 212
       at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
       at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
       at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
       at EfEnumToLookup.LookupGenerator.EnumToLookup.FindReferences(DbContext context) in c:\repo\ef-enum-to-lookup\EfEnumToLookup\LookupGenerator\EnumToLookup.cs:line 209
       at EfEnumToLookup.LookupGenerator.EnumToLookup.Apply(DbContext context) in c:\repo\ef-enum-to-lookup\EfEnumToLookup\LookupGenerator\EnumToLookup.cs:line 73
       at EFTests.Db.TestInitializer.Seed(MagicContext context) in c:\repo\ef-enum-to-lookup\EFTests\Db\TestInitializer.cs:line 17
       at System.Data.Entity.DropCreateDatabaseAlways`1.InitializeDatabase(TContext context)
       at System.Data.Entity.Internal.InternalContext.<>c__DisplayClassf`1.<CreateInitializationAction>b__e()
       at System.Data.Entity.Internal.InternalContext.PerformInitializationAction(Action action)
       at System.Data.Entity.Internal.InternalContext.PerformDatabaseInitialization()
       at System.Data.Entity.Internal.LazyInternalContext.<InitializeDatabase>b__4(InternalContext c)
       at System.Data.Entity.Internal.RetryAction`1.PerformAction(TInput input)
  InnerException: EfEnumToLookup.LookupGenerator.EnumGeneratorException
       HResult=-2146233088
       Message=Multiple EntityTypeMappings found.
       Source=EfEnumToLookup
       StackTrace:
        at EfEnumToLookup.LookupGenerator.EnumToLookup.GetTableName(MetadataWorkspace metadata, EntityType entityType) in c:\repo\ef-enum-to-lookup\EfEnumToLookup\LookupGenerator\EnumToLookup.cs:line 284
       InnerException: 

@timabell
Copy link
Owner

work in progress on branch inherited-types

@timabell
Copy link
Owner

fixed and merged into master

@timabell
Copy link
Owner

Released fix in v1.4.0, please report back with any problems. Thanks for your report.

timabell added a commit that referenced this issue Feb 15, 2015
@timabell
Copy link
Owner

ignore that ^
wrong issue #

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants