How to get ForeignCollection Field into Cursor in Ormlite
I have a ForeignCollection field in my table below : @DatabaseTable(tableName = "json_main") public class JsonMain { @DatabaseField( id = true) int _id; @DatabaseField int likes_count; @DatabaseField String protected_visibility; @ForeignCollectionField ForeignCollection<JsonUser> jsonUser = null; } And Reference of this table here : @DatabaseTable (tableName = "json_main_user") public class JsonUser { @DatabaseField(generatedId = true) public int _id; @DatabaseField(foreign = true, foreignAutoRefresh = true, columnName = "parent_id") private JsonMain jsonMain; } I'm Building My Query to get