Page 1 of 1

Schema specified is not valid

Posted: Thu 25 Oct 2012 17:53
by mrvllus
I have research this on the forums using this thread:

http://forums.devart.com/viewtopic.php? ... lid#p84144

We are using the latest 7.2 drivers and are still getting this issue. We have tried adding the code:
config=Devart.Data.Oracle.Entity.Configuration.OracleEntityProviderConfig.Instance;
config.CodeFirstOptions.ColumnTypeCasingConventionCompatibility = false;

but that doesn't seem to help, here is the exception stack trace:
88,6) : error 0040: The Type nvarchar2 is not qualified with a namespace or alias. Only primitive types can be used without qualification.
(90,6) : error 0040: The Type nvarchar2 is not qualified with a namespace or alias. Only primitive types can be used without qualification.
(91,6) : error 0040: The Type nvarchar2 is not qualified with a namespace or alias. Only primitive types can be used without qualification.
(92,6) : error 0040: The Type nvarchar2 is not qualified with a namespace or alias. Only primitive types can be used without qualification.
at System.Data.Metadata.Edm.StoreItemCollection.Loader.LoadItems(IEnumerable`1 xmlReaders, IEnumerable`1 sourceFilePaths)
at System.Data.Metadata.Edm.StoreItemCollection.Init(IEnumerable`1 xmlReaders, IEnumerable`1 filePaths, Boolean throwOnError, DbProviderManifest& providerManifest, DbProviderFactory& providerFactory, String& providerManifestToken, Memoizer`2& cachedCTypeFunction)
at System.Data.Metadata.Edm.StoreItemCollection..ctor(IEnumerable`1 xmlReaders)
at System.Data.Entity.ModelConfiguration.Edm.Db.DbDatabaseMetadataExtensions.ToStoreItemCollection(DbDatabaseMetadata database)
at System.Data.Entity.ModelConfiguration.Edm.Db.Mapping.DbDatabaseMappingExtensions.ToMetadataWorkspace(DbDatabaseMapping databaseMapping)
at System.Data.Entity.Internal.CodeFirstCachedMetadataWorkspace..ctor(DbDatabaseMapping databaseMapping)
at System.Data.Entity.Infrastructure.DbCompiledModel..ctor(DbModel model)
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.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.Join[TOuter,TInner,TKey,TResult](IQueryable`1 outer, IEnumerable`1 inner, Expression`1 outerKeySelector, Expression`1 innerKeySelector, Expression`1 resultSelector)
at TM.Services.IspService.UpdateOracleInetProvider(InetProvider isp) in c:\Workspaces\FTM\Apps\TM\TM.Services\Services\InetProviderService.cs:line 146
at TM.Services.IspService.UpdateInternetProvider(InetProvider isp) in c:\Workspaces\FTM\Apps\TM\TM.Services\Services\InetProviderService.cs:line 141
at TM.Web.Controllers.FirewallController.SaveIspJson(InetProvider isp) in c:\Workspaces\FTM\Apps\TM\TM.Web\Controllers\FirewallController.cs:line 304

Re: Schema specified is not valid

Posted: Thu 25 Oct 2012 20:27
by mrvllus
turns out that we had to switch the value to true:

config.CodeFirstOptions.ColumnTypeCasingConventionCompatibility = true;

problem solved

Re: Schema specified is not valid

Posted: Mon 29 Oct 2012 14:26
by Shalex
The ColumnTypeCasingConventionCompatibility option allows you to avoid explicitly turning off the ColumnTypeCasingConvention for each DbContext when working with Devart dotConnect for Oracle. By default it is set to false. When using XML mapping (Entity Framework v1 and v4) - a edmx/edml file and ObjectContext or DbContext in the XML mapping mode - this option must be FALSE. When using Entity Framework Code First (Entity Framework v1 and v4), this option can be true or false, but if it is set to false, you must turn off ColumnTypeCasingConvention explicitly for each DbContext. This option must be True for EF Code-First Migrations (EF v4.3.x and v5.x) to work correctly.

For more information, refer to http://www.devart.com/dotconnect/oracle ... ation.html.