- edited description
Issues with creating tables on new aplpha versions using the sqlite-net packages
Hi,
Before the shift to the sqlite-net packages (updated extensions to alpha packages.) we we're able to create tables and the relational tables of our models with related model properties. (ManyToOne attributes etc). However, when we try to do the shift we are now hitting issues on these models.
I'm getting the following exception on a model that has a ManyToOne relation defined.
Don't know about Core.Model.Currency
relevant part of the stack trace:
at SQLite.Orm.SqlType (SQLite.TableMapping+Column p, System.Boolean storeDateTimeAsTicks) [0x001ad] in /Users/fak/Dropbox/Projects/sqlite-net/src/SQLite.cs:2065
at SQLite.Orm.SqlDecl (SQLite.TableMapping+Column p, System.Boolean storeDateTimeAsTicks) [0x00000] in /Users/fak/Dropbox/Projects/sqlite-net/src/SQLite.cs:2012
at SQLite.SQLiteConnection.<CreateTable>m__0 (SQLite.TableMapping+Column p) [0x00000] in /Users/fak/Dropbox/Projects/sqlite-net/src/SQLite.cs:417
at System.Linq.Enumerable+WhereSelectArrayIterator`2[TSource,TResult].MoveNext () [0x0004d] in /Users/builder/data/lanes/3511/77cb8568/source/mono/mcs/class/referencesource/System.Core/System/Linq/Enumerable.cs:327
at System.Linq.Buffer`1[TElement]..ctor (System.Collections.Generic.IEnumerable`1[T] source) [0x00083] in /Users/builder/data/lanes/3511/77cb8568/source/mono/mcs/class/referencesource/System.Core/System/Linq/Enumerable.cs:2594
at System.Linq.Enumerable.ToArray[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x00011] in /Users/builder/data/lanes/3511/77cb8568/source/mono/mcs/class/referencesource/System.Core/System/Linq/Enumerable.cs:856
at SQLite.SQLiteConnection.CreateTable (System.Type ty, SQLite.CreateFlags createFlags) [0x00133] in /Users/fak/Dropbox/Projects/sqlite-net/src/SQLite.cs:418
at SQLite.SQLiteConnection.CreateTable[T] (SQLite.CreateFlags createFlags) [0x00000] in /Users/fak/Dropbox/Projects/sqlite-net/src/SQLite.cs:378
Any suggeestions on how to get arround the issue?
Thanks!
Kr, Michael
Comments (4)
-
reporter -
This issue is usually caused because there's more than one sqlite-net package in the project. The most common scenario is having one sqlite-net package added manually and another one added automatically as dependency of SQLite-Net Extensions.
To solve it, make sure that the SQLite-Net Extensions dependency and the manual dependency is the same, or remove the manual sqlite-net dependency and let NuGet add the correct one for you.
-
reporter Thanks for the quick reply! I will try this out.
-
I have had this problem - so I removed SQLite-Net Extensions with NuGet Package manager and it's dependencies. Then I added it back with the command line -Pre command.
It adds a SQLite-net library with a version of 1.1.0.0 but I get an error:
Severity Code Description Project File Line Error CS0012 The type 'SQLiteConnection' is defined in an assembly that is not referenced. You must add a reference to assembly 'SQLite.Net, Version=3.0.5.0, Culture=neutral, PublicKeyToken=null'. Tester.Backflow.Droid C:\Users\jason\Documents\Visual Studio 2015\Projects\Tester.Backflow\Tester.Backflow\Tester.Backflow.Droid\SQLite_Android.cs 11
- Log in to comment