Quantcast
Channel: Entity Framework
Viewing all articles
Browse latest Browse all 10318

Commented Issue: 'Shared Columns': The item with identity 'SomeSharedColumn' already exists in the metadata collection. [1063]

$
0
0
I am trying this with __EntityFramework.6.0.0-alpha3-20420__

Further to the issue https://entityframework.codeplex.com/workitem/1021 and https://entityframework.codeplex.com/workitem/583. I am seeing this error with __"Shared Columns"__. See attachment for repro. Stack Trace:
```
at System.Data.Entity.Core.Metadata.Edm.MetadataCollection`1.AddToDictionary(Dictionary`2 identityDictionary, List`1 orderedList, String identity, Int32 index, Boolean updateIfFound)
at System.Data.Entity.Core.Metadata.Edm.MetadataCollection`1.<InvalidateCache>b__0()
at System.Lazy`1.CreateValue()
at System.Lazy`1.LazyInitValue()
at System.Lazy`1.get_Value()
at System.Data.Entity.Core.Metadata.Edm.MetadataCollection`1.IndexOf(CollectionData collectionData, String identity, Boolean ignoreCase)
at System.Data.Entity.Core.Metadata.Edm.MetadataCollection`1.IndexOf(T item)
at System.Data.Entity.Core.Metadata.Edm.MemberCollection.IndexOf(EdmMember item)
at System.Data.Entity.Core.Metadata.Edm.MetadataCollection`1.Contains(T item)
at System.Data.Entity.Core.Metadata.Edm.StructuralType.HasMember(EdmMember member)
at System.Data.Entity.ModelConfiguration.Configuration.TphColumnFixer.RemoveDuplicateTphColumns()
at System.Data.Entity.ModelConfiguration.Configuration.ModelConfiguration.RemoveDuplicateTphColumns(DbDatabaseMapping databaseMapping)
at System.Data.Entity.ModelConfiguration.Configuration.ModelConfiguration.Configure(DbDatabaseMapping databaseMapping, DbProviderManifest providerManifest)
at System.Data.Entity.DbModelBuilder.Build(DbProviderManifest providerManifest, DbProviderInfo providerInfo)
at System.Data.Entity.DbModelBuilder.Build(DbConnection providerConnection)
at System.Data.Entity.Internal.LazyInternalContext.CreateModel(LazyInternalContext internalContext)
at System.Data.Entity.Internal.RetryLazy`2.GetValue(TInput input)
at System.Data.Entity.Internal.LazyInternalContext.InitializeContext()
at System.Data.Entity.Internal.InternalContext.Initialize()
at System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type entityType)
at System.Data.Entity.Internal.Linq.InternalSet`1.Initialize()
at System.Data.Entity.Internal.Linq.InternalSet`1.get_InternalContext()
at System.Data.Entity.Infrastructure.DbQuery`1.System.Linq.IQueryable.get_Provider()
at System.Linq.Queryable.OfType[TResult](IQueryable source)
at EF6Test.Program.Main(String[] args) in c:\Users\Ben\Documents\Visual Studio 11\Projects\EF6Test\EF6Test\Program.cs:line 16
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
```
Comments: Thank you, The error is no longer there in all the situations it was showing up. Will keep testing to make sure we have uncovered all the "Shared Column" issues before EF6 release. It's such a great feature.

Viewing all articles
Browse latest Browse all 10318

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>