foreignAutoRefresh does not reuse foreign object instance

5 views
Skip to first unread message

Gytis Jakutonis

unread,
Sep 4, 2019, 10:54:09 AM9/4/19
to ORMLite Android Users
Simple example:

class Book {
    @DatabaseField(foreign = true, foreignAutoRefresh = true)
    var author: Author? = null
}

If I query 10 books of the same author, I get 10 Author instances for each Book. I would expect to get just one instance, shared between all Book instances within same query result.


Reply all
Reply to author
Forward
0 new messages