sqlite-net-extensions's People
sqlite-net-extensions's Issues
OneToOne relationship with same entity type
Im trying to establish a one to one relationship with same entity type, but I can't understand why the data gets inserted incorrectly and even when I insert the data manually, when I try to gets them, instead of getting the object that have his PrimaryKey = to the ForeignKey, it go gets the object that has his ForeignKey = to the ForeignKey.
[Table("Localisations")]
public class Localisation
{
[PrimaryKey]
public int Id { get; set; }
public string Label{ get; set; }
[ForeignKey(typeof(Localisation))]
public int ParentId{ get; set; }
[OneToOne]
public Localisation? Parent{ get; set; }
}
Use System.Text.Json instead of Newtonsoft.Json
Please consider using System.Text.Json for serialization instead of Newtonsoft.Json as System.Text.Json already exists in the .Net and don't need additional pakage.
Although I see many people complaining about getting errors related to Newtonsoft.Json being used.
Writeonly List properties
Hi!
First of all, I have to say, you've coded a nice piece of software. Makes life with Sqlite-databases much easier!
It would be even better if you could consider filling Lists/Arrays/ObservableCollections instead of overwriting them with a property setter. This would make object models even more clean.
Example: You have the following object property:
[OneToMany(CascadeOperations = CascadeOperation.CascadeRead)]
public List<Foo> Bar { get; set; }
more clean would be (as it would allow other objects to only add or remove items from the List:
[OneToMany(CascadeOperations = CascadeOperation.CascadeRead)]
public List<Foo> Bar { get; } = new List<Foo>();
In the SQLite-Net-Extensions, the method for setting this List has to be extended with something like
List.Clear();
List.AddRange(IEnumerable<T> readObjects);
With best regards,
Carsten
Outdated package reference
This package references an old version of sqlite-net-pcl, causing the following issue without explicitly referencing the latest version of sqlite-net-pcl
xamarin/xamarin-macios#19910
List<string> as OneToMany relationship
I stucked with some primitive object as string => List
public class EventData
{
[PrimaryKey, AutoIncrement]
public int Id { get; set; }
[JsonProperty("eventType")]
public long EventType { get; set; }
[JsonProperty("eventValue")]
public string EventValue { get; set; }
[JsonProperty("date")]
public DateTimeOffset Date { get; set; }
[JsonProperty("device")]
public string Device { get; set; }
[JsonProperty("name")]
public string Name { get; set; }
[JsonProperty("classname")]
public string ClassName { get; set; }
[JsonProperty("parameters")]
[OneToMany(CascadeOperations = CascadeOperation.All)]
public List<string> Parameters { get; set; }
public string EventTypeString { get; set; }
public string DateFormated { get; set; }
public string EventGlyph { get; set; }
public string EventColor { get; set; }
public string EventFont { get; set; }
}
It wont recognize List, I m getting message to add a fk on that? How to do that when I dont have a complex model?
`GetWithChildren`/`GetAllWithChildren` get stuck on iOS 16.2
Hello,
I've been testing my Xamarin.Forms on iOS and ran into an error with the WithChildren
methods.
My code:
try
{
return DB.GetAllWithChildren<T>().ToArray();
}
catch (Exception ex)
{
return null;
}
Where DB
is SQLiteConnection
....
Usually this works well, but sometimes when I open the app it gets stuck on this specific line, or a similar line containing GetWithChildren
.
I'm not sure what's going on, but it feels like some kind of deadlock issue in the library that seldom occurs but can happen.
Your help would be appreciated.
Versions:
- Xamarin.Forms: 4.8.0.1560
- sqlite-net-pcl: 1.8.116
- SQLiteNetExtensions: 2.1.0
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.