EntityFramework-Effort: Oracle Entity Framework Generated Context Exception:Schema specified is not valid. Errors: (0,0) : error 2019: Member Mapping specified is not valid. The type 'Edm.Boolean[Nullable=True,DefaultValue=]' ...

Hi, awesome Effort and code! I’m trying to use it for Oracle, I’ve fixed Export CSV Tool, now I’m trying to run simple example:

var dl = new CsvDataLoader(“…”); var connection = Effort.EntityConnectionFactory.CreateTransient(“name=EapEntities”, dl); var db = new EapEntities(connection); db.CM_HUMAN.Take(100).Dump();

and getting this errors: MappingException: Schema specified is not valid. Errors: (0,0) : error 2019: Member Mapping specified is not valid. The type ‘Edm.Boolean[Nullable=True,DefaultValue=]’ of member ‘DEFAULT_FLAG’ in type ‘Model.CE_CATALOG_ENTRY_NG’ is not compatible with ‘Effort.decimal[Nullable=True,DefaultValue=,Precision=1,Scale=0]’ of member ‘DEFAULT_FLAG’ in type ‘Model.Store.CE_CATALOG_ENTRY_NG’. (0,0) : error 2019: Member Mapping specified is not valid. The type ‘Edm.Boolean[Nullable=True,DefaultValue=]’ of member ‘CITY_LOOKUP_BROKEN’ in type ‘Model.CM_ADDRESS’ is not compatible with ‘Effort.decimal[Nullable=True,DefaultValue=,Precision=1,Scale=0]’ of member ‘CITY_LOOKUP_BROKEN’ in type ‘Model.Store.CM_ADDRESS’. (0,0) : error 2019: Member Mapping specified is not valid.

I’ve attached debugger and can see that error happening at:

at Effort.Internal.Common.MetadataWorkspaceHelper.CreateMetadataWorkspace(List1 csdl, List1 ssdl, List`1 msl)

at this line in \effort-master\Main\Source\Effort\Internal\Common\MetadataWorkspaceHelper.cs

        StorageMappingItemCollection smic = new StorageMappingItemCollection(eic, sic, msl.Select(c => c.CreateReader()));

at System.Data.Entity.Core.Mapping.StorageMappingItemCollection.Init(EdmItemCollection edmCollection, StoreItemCollection storeCollection, IEnumerable1 xmlReaders, IList1 filePaths, Boolean throwOnError) at System.Data.Entity.Core.Mapping.StorageMappingItemCollection…ctor(EdmItemCollection edmCollection, StoreItemCollection storeCollection, IEnumerable1 xmlReaders) at Effort.Internal.Common.MetadataWorkspaceHelper.CreateMetadataWorkspace(List1 csdl, List1 ssdl, List1 msl) at Effort.Internal.Common.MetadataWorkspaceHelper.Rewrite(String metadata, String providerInvariantName, String providerManifestToken) at Effort.EntityConnectionFactory.<GetEffortCompatibleMetadataWorkspace>b__1(String metadata) at Effort.Internal.Caching.MetadataWorkspaceStore.<>c__DisplayClass1.<GetMetadataWorkspace>b__0() at System.Lazy1.CreateValue() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Lazy1.get_Value() at Effort.Internal.Caching.ConcurrentCache2.Get(TKey key, Func1 factory) at Effort.Internal.Caching.MetadataWorkspaceStore.GetMetadataWorkspace(String metadata, Func`2 workspaceFactoryMethod) at Effort.EntityConnectionFactory.GetEffortCompatibleMetadataWorkspace(String& entityConnectionString) at Effort.EntityConnectionFactory.CreateTransient(String entityConnectionString, IDataLoader dataLoader) at UserQuery 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()

Any ideas appreciated 👍

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 15 (6 by maintainers)

Most upvoted comments

Oh, I misread your comment. We will look at it this week 😉

Perhaps no option will be required.