So I have the below code. Where I am trying to create a table called SecurityType which has values ID and description. I would like to add two strings "Administrator" and "user" to it. Is there a way I can exclude these two from being columns in the ebean table? or do I need to move to another class?
@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;
}
Make them transient:
@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;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With