Primary key support for more then one column - i.e. Composite key
See original GitHub issuepublic class Image { [PrimaryKey] public int ItemId { get; set; }
[PrimaryKey]
public int ImageId { get; set; }
public string Src { get; set; }
public int Width { get; set; }
public int Height { get; set; }
public byte[] ImageBinary { get; set; }
}
Get the following error:
SQLite.SQLiteException was unhandled by user code HResult=-2146233088 Message=table “Image” has more than one primary key Source=MyPocket StackTrace: at SQLite.SQLite3.Prepare2(IntPtr db, String query) in c:\dev\tfs\MyPocket\MyPocket\SQLite.cs:line 2392 at SQLite.SQLiteCommand.Prepare() in c:\dev\tfs\MyPocket\MyPocket\SQLite.cs:line 1699 at SQLite.SQLiteCommand.ExecuteNonQuery() in c:\dev\tfs\MyPocket\MyPocket\SQLite.cs:line 1573 at SQLite.SQLiteConnection.Execute(String query, Object[] args) in c:\dev\tfs\MyPocket\MyPocket\SQLite.cs:line 467 at SQLite.SQLiteConnection.CreateTable(Type ty) in c:\dev\tfs\MyPocket\MyPocket\SQLite.cs:line 318 at SQLite.SQLiteConnection.CreateTableT in c:\dev\tfs\MyPocket\MyPocket\SQLite.cs:line 288 at MyPocket.Data.SQLitePocketRepository…ctor(String dbPath) in c:\dev\tfs\MyPocket\MyPocket\Data\SQLitePocketRepository.cs:line 24 at MyPocket.View.HomePage.<LoadState>d__0.MoveNext() in c:\dev\tfs\MyPocket\MyPocket\View\HomePage.xaml.cs:line 112 InnerException:
Issue Analytics
- State:
- Created 11 years ago
- Comments:10
Top GitHub Comments
Try my fork
Le jeu. 18 août 2022 à 14:39, Florian Fischer @.***> a écrit :
– Benjamin Mayrargue Vapolia.fr +33682227850 vapolia.fr http://www.vapolia.fr/ Skype/WhatsApp/Slack/Discord/Zoom/Teams/Meets/…
Yeah, I`ve seen this, thank you! But still this package is not fixed yet and this is relatively simple feature.