- edited description
"too many SQL variables" on UpdateWithChildren
I have assumed that the OneToMany peoperty which have 1020 items is a problem. How do I solve this problem?
// packages.config <?xml version="1.0" encoding="utf-8"?> <packages> <package id="Newtonsoft.Json" version="6.0.8" targetFramework="net45" /> <package id="SQLite.Net.Platform.Win32" version="2.5.1" targetFramework="net45" /> <package id="SQLite.Net-PCL" version="2.5.1" targetFramework="net45" /> <package id="SQLiteNetExtensions" version="1.2.5" targetFramework="net45" /> <package id="System.Data.SQLite.Core" version="1.0.96.0" targetFramework="net45" /> </packages> //
Comments (13)
-
reporter -
reporter - edited description
-
We found out that there's a 1000 variable count limit in some Windows platforms. We already added a fix for
DeleteAll
method, it seems that I need to check theUpdateWithChildren
method. I'll review it as soon as possible. -
I get the same error at InsertOrReplaceWithChildren, I think you need to watch all of these methods.
-
Bug seems to be existent in V1.3 too. (UpdateWithChildren) ;(
-
I don't have a windows machine to reproduce the error and it's working fine on Mac and iOS. Can someone check where it's exactly crashing inside the library? Thanks.
-
I can confirm this issue. We also encounter the problem when calling UpdateWithChildren.
This is our stacktrace:
at SQLite.Net.Platform.XamarinAndroid.SQLiteApiAndroid.Prepare2 (IDbHandle db, System.String query) [0x00037] in <filename unknown>:0 at SQLite.Net.SQLiteCommand.Prepare () [0x0001c] in <filename unknown>:0 at SQLite.Net.SQLiteCommand.ExecuteNonQuery () [0x00016] in <filename unknown>:0 at SQLite.Net.SQLiteConnection.Execute (System.String query, System.Object[] args) [0x00044] in <filename unknown>:0 at SQLiteNetExtensions.Extensions.WriteOperations.UpdateOneToManyInverseForeignKey (SQLite.Net.SQLiteConnection conn, System.Object element, System.Reflection.PropertyInfo relationshipProperty) [0x001c6] in <filename unknown>:0 at SQLiteNetExtensions.Extensions.WriteOperations.UpdateInverseForeignKeys (SQLite.Net.SQLiteConnection conn, System.Object element) [0x00040] in <filename unknown>:0 at SQLiteNetExtensions.Extensions.WriteOperations.UpdateWithChildren (SQLite.Net.SQLiteConnection conn, System.Object element) [0x0000e] in <filename unknown>:0 at MyApp.UpdateStuff (Stuff stuff) [0x00008] in D:\bla\bla\StuffContentProvider.cs:267
This is a very serious bug for us, because in our app it can happen very quickly that a database object references more than 1000 other objects.
-
@rsnitsch thanks for the stack trace. That seems to be fixed in master branch, but a new nuget package hasn't been published since then. Can you check with the latest sources?
-
Getting the same issue for InsertWithChildren. Any news on a nuget publish? And will it contain fixes for all methods where this is an issue?
-
Can you confirm this error remains with
2.0.0-alpha1
? -
Serious Crash when Creating table with the 2.0.0-alpha1
-
Do you have a stacktrace and some code?
-
Xamarin.Forms PCL Project Running test iOS version
Exception returned : System.TypeInitializationException: The type initializer for 'MyapplicationName.App' threw an exception.
I have Initialized a variable that handles the database in APP.cs
and the exception is thrown when create table is executed (using breakpoints):
public DataBase() { _connectionToDB = DependencyService.Get<ISQLite>().GetConnection(); ** _connectionToDB.CreateTable<person>(); ** }
and on the stack trace i got : > 0x13 in MyApplicationAPP.iOS.AppDelegate.FinishedLaunching at ..\MyApplicationAPP\iOS\AppDelegate.cs:24,13 C#
- Log in to comment