我有一个Ebeans Entity类,如下所示:
@Entity
public class User {
@Id
private Long userid;
@Constraints.Required
private String username;
private boolean active;
private String img;
private String status;
private int value;
private int gender; // 0 = female, 1 = male
private int orientation; // 0 = straight, 1 = gay, 2 = bi
private int listIndex; // used to store listindex for page references
private int precessor; // used to link the pages
private int sucessor;
private static final int USER_AMOUNT = 50;
/* FINDER */
public static Model.Finder<Long,User> find = new Model.Finder<Long, User>(
Long.class, User.class
);
对象中需要listIndex
precessor
和sucessor
个变量,但数据库中不存在这些变量。 Finder相信它们是,这使我的SQL语句失败。
所以我的问题是,我可以告诉Finder不要在SQL语句中包含这三个变量吗?