How to get ForeignCollection Field into Cursor in Ormlite

牧云@^-^@ 提交于 2019-12-08 04:16:20

I have inserted the Data Correctly into Database I want to Know How could I get ForeignCollection of json_main table using ormlite using Cursor .Above is what I have tried .

I hope I understand the question. The JsonMain Cursor doesn't have any information from the JsonUser table. What it does have is the _id field which corresponds to the jsonMain_id field which is in the JsonUser table. What you can do is take that _id and do a query on the JsonUser table to get the associated users.

The only other way to do this would be to construct your own JOIN raw query which returns both the main fields and the user fields in one cursor. Unfortunately ORMLite won't help much in this scenario.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!