sqlite-net-extensions

SQLite-Net Extensions - GetAllWithChildrenAsync not pulling everything

杀马特。学长 韩版系。学妹 提交于 2021-02-17 06:10:12
问题 I am trying to use SQLite-Net Extensions to create a Relational Database. I'm running into an issue when trying to pull the Term object from the database. It successfully pulls over its associated courses, but not the courses associated assessments and notes. I'm not sure if the problem lies in how I insert the objects into the database, how I pull the objects from the database, or how I have the objects attributes listed. I feel like the SQLite-Net Extensions documentation is extremely

SQLiteAsyncConnection UpdateWithChildren not available

﹥>﹥吖頭↗ 提交于 2021-02-07 22:26:30
问题 I am trying to implement a OneToMany relationship inside my PCL using SQLite.net. I have the async extensions package (SQLiteNetExtensions.Async) and I am basing the code on the example found in https://bitbucket.org/twincoders/sqlite-net-extensions. I am using SQLiteAsyncConnection but the UpdateWithChildren method does not seem to be available, only with SQLiteConnection. using SQLite.Net; using SQLite.Net.Async; using SQLite.Net.Interop; using SQLiteNetExtensions.Extensions; private

SQLiteAsyncConnection UpdateWithChildren not available

*爱你&永不变心* 提交于 2021-02-07 22:21:02
问题 I am trying to implement a OneToMany relationship inside my PCL using SQLite.net. I have the async extensions package (SQLiteNetExtensions.Async) and I am basing the code on the example found in https://bitbucket.org/twincoders/sqlite-net-extensions. I am using SQLiteAsyncConnection but the UpdateWithChildren method does not seem to be available, only with SQLiteConnection. using SQLite.Net; using SQLite.Net.Async; using SQLite.Net.Interop; using SQLiteNetExtensions.Extensions; private

SQLite: Retrieve child element from object in list

ぐ巨炮叔叔 提交于 2021-01-27 21:03:03
问题 There is a Basket , which stores a List<Fruit> . Each Fruit has one Pip . If I store this relationship and retrieve it later, the ForeignKey PipId has a value, but the object Pip is null , despite I use CascadeRead . If I try to use CascadeOperation.All on FruitList I get Constraint at SQLite.PreparedSqlLiteInsertCommand.ExecuteNonQuery (System.Object[] source) [0x00116] in /Users/fak/Dropbox/Projects/sqlite-net/src/SQLite.cs:2507 at SQLite.SQLiteConnection.Insert (System.Object obj, System

How to specify a foreign key property in SQLite-Net Extensions

牧云@^-^@ 提交于 2020-06-11 05:22:48
问题 How do I specify a foreign key that references a specific property instead of the primary key? For example the Stock class has a uuid property. And I want to create a foreign key in the Valuation class that references it using this property. In the following example the line [ForeignKey(typeof(Stock))] references the ID property of the Stock class, but I need it to reference the UUID property. How would I do that? public class Stock { [PrimaryKey, AutoIncrement] public int Id { get; set; }

How to delete a relationship from many to many table in sqlite-net extension?

邮差的信 提交于 2019-12-25 11:59:19
问题 I've a many to many relationship between students and classes using SQLite-net Extensions: public class Students { [PrimaryKey, AutoIncrement] public int StudentId { get; set; } public string Name { get; set; } [ManyToMany(typeof(Students_Classes))] public List<Classes> Classes { get; set; } } public class Classes { [PrimaryKey, AutoIncrement] public int ClassId { get; set; } public string Name { get; set; } [ManyToMany(typeof(Students_Classes))] public List<Students> Students { get; set; } }

Android - The type initializer for 'SQLite.SQLiteConnection' threw an exception. ---> System.DllNotFoundException: e_sqlite3

走远了吗. 提交于 2019-12-10 20:35:08
问题 On our Xamarin Android project we are trying to switch from sqlite-net to official sqlite-net-pcl package. However after this switch when creating a new SQLiteConnection I am getting following exception: The type initializer for 'SQLite.SQLiteConnection' threw an exception. ---> System.DllNotFoundException: e_sqlite3 Full exception: Xamarin caused by: android.runtime.JavaProxyThrowable: System.TypeInitializationException: The type initializer for 'SQLite.SQLiteConnection' threw an exception.

SQLite.Net.Platform for Windows Phone 8.1

杀马特。学长 韩版系。学妹 提交于 2019-12-08 11:31:20
问题 I can't find any SQLite.Net.Platform library that works with Windows Phone 8.1 . These are not working: https://www.nuget.org/packages/SQLite.Net.Platform.WindowsPhone8/ https://www.nuget.org/packages/SQLite.Net.Platform.WinRT/ https://www.nuget.org/packages/SQLite.Net.Platform.Generic/ https://www.nuget.org/packages/SQLite.Net.Platform.Win32/ Any workaround? 回答1: WinRT platform is compatible with Windows Phone 8.1 projects. You can copy the sources to your platform specific project and

Method 'SQLiteConnection.InsertAll' not found

早过忘川 提交于 2019-12-08 05:38:36
问题 I'm trying to get many-to-many database relationships working in my database on (currently) an Android Samsung S6 mobile. To this end I am using SQLite.Net-PCL 3.0.5 and SQLiteNetExtensions 1.3.0. I have had simple SQlite access working fine, but now I have attempted to setup a many to many relationship (via a linking table), the sqlite-net-extensions are throwing when I call m_DatabaseConnection.UpdateWithChildren(article); The exception is: System.MissingMethodException: Method

ManyToOne constraint not working

家住魔仙堡 提交于 2019-12-08 05:19:09
问题 I have very simple relationship, my model looks like this: public class Project { [PrimaryKey, AutoIncrement] public int ID { get; set; } public string Name { get; set; } [ForeignKey(typeof(User))] public int ProjectManagerID { get; set; } [ManyToOne] public User ProjectManager { get; set; } } public class User { public string Login { get; set; } [OneToMany] public List<Project> Projects { get; set; } } The problem is that I can easly save project, with its reference to user without saving