1

Closed

Debug asserts: Found type 'System.Data.Entity.Core.Mapping.ValueConditionMapping', did we add a new type?

description

Good Day,

I made an attempt to use the package for Entity Framework 6.1.3, and getting the debug asserts witht he following message:

Found type 'System.Data.Entity.Core.Mapping.ValueConditionMapping', did we add a new type?

with the following stack.

Is the package compatible with EF 6.1.3? Or am I doing something wrong?

Much appreciated
Iouri
>   EntityFramework.dll!System.Data.Entity.Core.Mapping.BaseMetadataMappingVisitor.Visit(System.Data.Entity.Core.Mapping.PropertyMapping propertyMapping) Line 415  C#
    EntityFramework.dll!System.Data.Entity.Core.Mapping.MetadataMappingHasherVisitor.Visit(System.Data.Entity.Core.Mapping.PropertyMapping propertyMapping) Line 156 + 0xd bytes    C#
    EntityFramework.dll!System.Data.Entity.Core.Mapping.BaseMetadataMappingVisitor.Visit(System.Data.Entity.Core.Mapping.MappingFragment mappingFragment) Line 387 + 0x1f bytes C#
    EntityFramework.dll!System.Data.Entity.Core.Mapping.MetadataMappingHasherVisitor.Visit(System.Data.Entity.Core.Mapping.MappingFragment mappingFragment) Line 147 + 0x13 bytes   C#
    EntityFramework.dll!System.Data.Entity.Core.Mapping.BaseMetadataMappingVisitor.Visit(System.Data.Entity.Core.Mapping.TypeMapping typeMapping) Line 372 + 0x1f bytes C#
    EntityFramework.dll!System.Data.Entity.Core.Mapping.MetadataMappingHasherVisitor.Visit(System.Data.Entity.Core.Mapping.TypeMapping typeMapping) Line 126 + 0xd bytes    C#
    EntityFramework.dll!System.Data.Entity.Core.Mapping.BaseMetadataMappingVisitor.Visit(System.Data.Entity.Core.Mapping.EntitySetBaseMapping setMapping) Line 58 + 0x1f bytes  C#
    EntityFramework.dll!System.Data.Entity.Core.Mapping.MetadataMappingHasherVisitor.Visit(System.Data.Entity.Core.Mapping.EntitySetBaseMapping setMapping) Line 107 + 0xd bytes    C#
    EntityFramework.dll!System.Data.Entity.Core.Mapping.BaseMetadataMappingVisitor.Visit(System.Data.Entity.Core.Mapping.EntityContainerMapping entityContainerMapping) Line 29 + 0x1f bytes    C#
    EntityFramework.dll!System.Data.Entity.Core.Mapping.MetadataMappingHasherVisitor.Visit(System.Data.Entity.Core.Mapping.EntityContainerMapping entityContainerMapping) Line 66 + 0x13 bytes  C#
    EntityFramework.dll!System.Data.Entity.Core.Mapping.MetadataMappingHasherVisitor.GetMappingClosureHash(double mappingVersion, System.Data.Entity.Core.Mapping.EntityContainerMapping entityContainerMapping, bool sortSequence) Line 831 + 0x16 bytes   C#
    EntityFramework.dll!System.Data.Entity.Core.Mapping.StorageMappingItemCollection.ComputeMappingHashValue(string conceptualModelContainerName, string storeModelContainerName) Line 1329 + 0x28 bytes    C#

...

    EntityFramework.dll!System.Data.Entity.Core.Objects.ObjectQuery<JService.Services.Storage.DbStorageConfigItemRecord>.GetResults.AnonymousMethod__5() Line 700 + 0x15f bytes C#
    EntityFramework.SqlServer.dll!System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute<System.Data.Entity.Core.Objects.ObjectResult<JService.Services.Storage.DbStorageConfigItemRecord>>(System.Func<System.Data.Entity.Core.Objects.ObjectResult<JService.Services.Storage.DbStorageConfigItemRecord>> operation) Line 43 + 0x1a bytes    C#
    EntityFramework.dll!System.Data.Entity.Core.Objects.ObjectQuery<JService.Services.Storage.DbStorageConfigItemRecord>.GetResults(System.Data.Entity.Core.Objects.MergeOption? forMergeOption) Line 699 + 0x123 bytes C#
    EntityFramework.dll!System.Data.Entity.Core.Objects.ObjectQuery<JService.Services.Storage.DbStorageConfigItemRecord>.System.Collections.Generic.IEnumerable<T>.GetEnumerator.AnonymousMethod__0() Line 568 + 0x18 bytes C#
    EntityFramework.dll!System.Data.Entity.Internal.LazyEnumerator<JService.Services.Storage.DbStorageConfigItemRecord>.MoveNext() Line 54 + 0x1e bytes C#
Closed Jul 17, 2016 at 5:00 AM by moozzyk
Closing as external.

comments

moozzyk wrote Jun 15, 2015 at 5:35 AM

This assert comes from EF. Can you file a bug on http://entityframework.codeplex.com and provide a repro?

moozzyk wrote Jun 15, 2015 at 5:37 PM

Created a bug in the EF project: https://entityframework.codeplex.com/workitem/2762

@Iouri: if you could attach a repro there it would be awesome.

iouri wrote Jun 15, 2015 at 9:33 PM

thank you for looking into it!

unfortunately a repro most likely involve our production schema which isnt ideal for us.

I was following this article of David Roth to improve EF startup performance which at the moment takes about 20 seconds, which is a real pain for us. With David's patch I got it down to 4 seconds.

While I managed to generate EDMX with InteractiveViews.SetViewCacheFactory() and pass it to David's DbModelStore, I couldnt use the InteractiveViews because of the mentioned exception in EF.

It is frustrating to see that the EF team doesn't seem to be taking it as a priority to merge David's (and yours) extensions, as ideally we would like to avoid having a branched version of EF.

Perhaps I could send you the generated EDMX to a private email?

Thank you
Regards
Iouri