Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/275.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/sqlite/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# Sqlite.Net-PCL复合主键_C#_Sqlite - Fatal编程技术网

C# Sqlite.Net-PCL复合主键

C# Sqlite.Net-PCL复合主键,c#,sqlite,C#,Sqlite,我希望在多对多表关系中使用复合主键。要创建表的obj类是: [Table("relationsip_tab")] class HtmlSrcFileRelationship { [Column("src_fk"),PrimaryKey] public string srcFk { get; set; } [Column("file_fk"), PrimaryKey] public string fileFk { get; set; } } 它给了我一

我希望在多对多表关系中使用复合主键。要创建表的obj类是:

    [Table("relationsip_tab")]
class HtmlSrcFileRelationship {

    [Column("src_fk"),PrimaryKey]
    public string srcFk { get; set; }

    [Column("file_fk"), PrimaryKey]
    public string fileFk { get; set; }
}
它给了我一个错误
EXCEPTION:SQLite.Net.SQLiteException:table“relationsip_tab”有多个主键


我正在使用Sqlite for Universal Windows Platform、Sqlite.Net-PCL和System.Data.Sqlite作为参考。有没有办法做到这一点?

看起来本机不支持复合键。虽然似乎有一些变通办法。我找到了下面描述它的链接。看起来本机不支持复合密钥。虽然似乎有一些变通办法。我找到了下面描述它的链接。