所以我有下面的代码。我正在尝试创建一个名为SecurityType的表,该表具有值ID和描述。我想在其中添加两个字符串"管理员"和"用户"。有没有办法将这两个从 ebean 表中的列中排除?还是我需要转到另一个班级?
@Entity
public class SecurityType extends Model {
public static final String ADMIN = "Administrator";
public static final String USER = "User";
@Id
public Long id;
public String description;
}
使它们瞬态:
@Entity
public class SecurityType extends Model {
@Transient
public static final transient String ADMIN = "Administrator";
@Transient
public static final transient String USER = "User";
@Id
public Long id;
public String description;
}