Exception when loading Entities

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for SQLite
Post Reply
m.ende
Posts: 4
Joined: Tue 26 Aug 2014 07:05

Exception when loading Entities

Post by m.ende » Tue 26 Aug 2014 08:03

Hi,

I receive the following Stack-Trace. The database is set up correctly but now when I try to query the database I receive this exception:

Code: Select all

   bei Devart.Data.SQLite.Entity.ab.g()
   bei Devart.Common.Entity.n.a(ad A_0)
   bei Devart.Common.Entity.ad.a(a7 A_0)
   bei Devart.Common.Entity.n.a(List`1 A_0)
   bei Devart.Common.Entity.Migrations.a.a(IEnumerable`1 A_0, c0 A_1)
   bei Devart.Data.SQLite.Entity.Migrations.SQLiteEntityMigrationSqlGenerator.Generate(IEnumerable`1 migrationOperations, String providerManifestToken)
   bei System.Data.Entity.Migrations.DbMigrator.GenerateStatements(IList`1 operations, String migrationId)
   bei System.Data.Entity.Migrations.Infrastructure.MigratorBase.GenerateStatements(IList`1 operations, String migrationId)
   bei System.Data.Entity.Migrations.DbMigrator.ExecuteOperations(String migrationId, XDocument targetModel, IEnumerable`1 operations, IEnumerable`1 systemOperations, Boolean downgrading, Boolean auto)
   bei System.Data.Entity.Migrations.DbMigrator.AutoMigrate(String migrationId, VersionedModel sourceModel, VersionedModel targetModel, Boolean downgrading)
   bei System.Data.Entity.Migrations.Infrastructure.MigratorBase.AutoMigrate(String migrationId, VersionedModel sourceModel, VersionedModel targetModel, Boolean downgrading)
   bei System.Data.Entity.Migrations.DbMigrator.Upgrade(IEnumerable`1 pendingMigrations, String targetMigrationId, String lastMigrationId)
   bei System.Data.Entity.Migrations.Infrastructure.MigratorBase.Upgrade(IEnumerable`1 pendingMigrations, String targetMigrationId, String lastMigrationId)
   bei System.Data.Entity.Migrations.DbMigrator.UpdateInternal(String targetMigration)
   bei System.Data.Entity.Migrations.DbMigrator.<>c__DisplayClassc.<Update>b__b()
   bei System.Data.Entity.Migrations.DbMigrator.EnsureDatabaseExists(Action mustSucceedToKeepDatabase)
   bei System.Data.Entity.Migrations.Infrastructure.MigratorBase.EnsureDatabaseExists(Action mustSucceedToKeepDatabase)
   bei System.Data.Entity.Migrations.DbMigrator.Update(String targetMigration)
   bei System.Data.Entity.Migrations.Infrastructure.MigratorBase.Update()
   bei System.Data.Entity.MigrateDatabaseToLatestVersion`2.InitializeDatabase(TContext context)
   bei System.Data.Entity.Internal.InternalContext.<>c__DisplayClassf`1.<CreateInitializationAction>b__e()
   bei System.Data.Entity.Internal.InternalContext.PerformInitializationAction(Action action)
   bei System.Data.Entity.Internal.InternalContext.PerformDatabaseInitialization()
   bei System.Data.Entity.Internal.LazyInternalContext.<InitializeDatabase>b__4(InternalContext c)
   bei System.Data.Entity.Internal.RetryAction`1.PerformAction(TInput input)
   bei System.Data.Entity.Internal.LazyInternalContext.InitializeDatabaseAction(Action`1 action)
   bei System.Data.Entity.Internal.LazyInternalContext.InitializeDatabase()
   bei System.Data.Entity.Internal.InternalContext.Initialize()
   bei System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type entityType)
   bei System.Data.Entity.Internal.Linq.InternalSet`1.Initialize()
   bei System.Data.Entity.Internal.Linq.InternalSet`1.get_InternalContext()
   bei System.Data.Entity.Infrastructure.DbQuery`1.System.Linq.IQueryable.get_Provider()
   bei System.Linq.Queryable.FirstOrDefault[TSource](IQueryable`1 source, Expression`1 predicate)
   bei ASpro.Hoppecke.Gui.Rechtshinweise.Rechtshinweise_Load(Object sender, EventArgs e) in
In my exceptions I see the followoing messages:
"An error occurred while executing the command definition. See the inner exception for details."

and:
"Die angegebene Methode wird nicht unterstützt." (System.NotSupportedException) Exception Message = "Die angegebene Methode wird nicht unterstützt.", Exception Type = "System.NotSupportedException", Exception WinRT Data = null




All my entities have a parent which is called AbstractBaseEntity, which contains information like changedOn, createdOn, deletedOn and the id column (PK).

Is this an problem?

Marc

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Exception when loading Entities

Post by Shalex » Thu 28 Aug 2014 13:06

There are some limitations in the Code-First Migrations operation support in dotConnect for SQLite: http://blog.devart.com/entity-framework ... ionSupport. If this is not the case, please send us a small test project with the corresponding database so that we can reproduce the issue in our environment.

Post Reply