我有 2 节课
列表
@DatabaseTable(tableName = "loginsList")
public class LoginsList {
@DatabaseField(columnName = "loginListID", generatedId = true)
private int loginListID;
@DatabaseField(columnName = "listName")
private String listName;
@DatabaseField(columnName = "listDescription")
private String listDescription;
@DatabaseField(columnName = "current")
private boolean current;
@DatabaseField(columnName = "sent")
private boolean sent;
登录
@DatabaseTable(tableName = "login")
public class Login {
@DatabaseField(columnName = "loginID", generatedId = true)
private int loginID;
@DatabaseField(columnName = "user", foreign=true)
private User user;
@DatabaseField(columnName = "loggedIn")
private boolean loggedIn;
@DatabaseField(columnName = "loginTime")
private long loginTime;
@DatabaseField(columnName = "logoutTime")
private long logoutTime;
@DatabaseField(columnName = "loginsList", foreign = true)
private LoginsList loginsList;
我使用 ORMLite 作为数据库。我想知道如何获取列表的所有登录信息?我试过这样
tempLoginList = loginDao.queryForEq("loginsList", list);
其中 list 是 LoginsList 类型,它是我想要获取所有登录名的列表,但它不起作用。如何使用查询生成器来做到这一点?