简体   繁体   English

SQLite-Net Extensions无法创建具有OneToOne关系的表

[英]SQLite-Net Extensions unable to create tables with OneToOne relationship

I created two classes, Item and Warranty. 我创建了两个类,项目和保修。 Item holds a reference to Warranty, and Warranty is tagged with a foreign key attribute. 项目包含对保修的引用,并且保修带有外键属性标记。 I'm following the same pattern as on the wiki page, yet I keep getting "doesn't know about Warranty" error. 我遵循的是与Wiki页面上相同的模式,但是我不断收到“不知道保修”错误。 Here's what my classes look like: 这是我的班级样子:

Item class 物品类别

在此处输入图片说明

Warranty class 保固等级

在此处输入图片说明

This is what I call to create the tables and the very first line is throwing the error. 这就是我创建表的调用,第一行引发错误。 在此处输入图片说明

OneToOne attribute inherits from Ignore sqlite.net attribute. OneToOne属性继承自Ignore sqlite.net属性。 If your sqlite.net is trying to create the Warranty column is because you have two sqlite.net libraries in your project. 如果您的sqlite.net试图创建“ Warranty列,是因为您的项目中有两个sqlite.net库。

Depending on what SQLite-Net Extensions versions you used, you may have included a different sqlite.net library. 根据您使用的SQLite-Net Extensions版本,您可能包括了一个不同的sqlite.net库。 Remove your old sqlite-net dependency or use the SQLite-Net Extensions suitable to your current sqlite-net library. 删除旧的sqlite-net依赖项或使用适合当前sqlite-net库的SQLite-Net扩展。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM