简体   繁体   中英

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. 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. If your sqlite.net is trying to create the Warranty column is because you have two sqlite.net libraries in your project.

Depending on what SQLite-Net Extensions versions you used, you may have included a different sqlite.net library. Remove your old sqlite-net dependency or use the SQLite-Net Extensions suitable to your current sqlite-net library.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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