NutzCN Logo
问答 nutz dao h2database 自动建表报错
发布于 168天前 作者 文涛(wentao) 206 次浏览 复制 上一个帖子 下一个帖子
标签:

bean文件

@Table("asset")
public class Asset extends BaseBean {
    @Column
    private String id;
    @Column
    private String originalid;
    @Column
    private String name;
    @Column
    private String kind;
    @Column
    private int status;
    @Column
    private int check;
    @Column
    private String operation_mode;
    @Column
    private int charges;
    @Column
    private int mark_id;
    @Column
    private int kind_id;
    @Column
    private int preview;
    @Column
    private int country_code;
    @Column
    private int preview_time;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getOriginalid() {
        return originalid;
    }

    public void setOriginalid(String originalid) {
        this.originalid = originalid;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getKind() {
        return kind;
    }

    public void setKind(String kind) {
        this.kind = kind;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public int getCheck() {
        return check;
    }

    public void setCheck(int check) {
        this.check = check;
    }

    public String getOperation_mode() {
        return operation_mode;
    }

    public void setOperation_mode(String operation_mode) {
        this.operation_mode = operation_mode;
    }

    public int getCharges() {
        return charges;
    }

    public void setCharges(int charges) {
        this.charges = charges;
    }

    public int getMark_id() {
        return mark_id;
    }

    public void setMark_id(int mark_id) {
        this.mark_id = mark_id;
    }

    public int getKind_id() {
        return kind_id;
    }

    public void setKind_id(int kind_id) {
        this.kind_id = kind_id;
    }

    public int getPreview() {
        return preview;
    }

    public void setPreview(int preview) {
        this.preview = preview;
    }

    public int getCountry_code() {
        return country_code;
    }

    public void setCountry_code(int country_code) {
        this.country_code = country_code;
    }

    public int getPreview_time() {
        return preview_time;
    }

    public void setPreview_time(int preview_time) {
        this.preview_time = preview_time;
    }

    /********************************其他用途************************************/

    private String lock_num;
    private String[] tryFiles;
    private String[] noTryFiles;
    private String[] productIds;

    public String[] getTryFiles() {
        return tryFiles;
    }

    public void setTryFiles(String[] tryFiles) {
        this.tryFiles = tryFiles;
    }

    public String[] getNoTryFiles() {
        return noTryFiles;
    }

    public void setNoTryFiles(String[] noTryFiles) {
        this.noTryFiles = noTryFiles;
    }

    public String getLock_num() {
        return lock_num;
    }

    public void setLock_num(String lock_num) {
        this.lock_num = lock_num;
    }

    public String[] getProductIds() {
        return productIds;
    }

    public void setProductIds(String[] productIds) {
        this.productIds = productIds;
    }
}

BaseBean

public class BaseBean {
    @Column
    private Date created_at;
    @Column
    private Date updated_at;

    public Date getCreated_at() {
        return created_at;
    }

    public void setCreated_at(Date created_at) {
        this.created_at = created_at;
    }

    public Date getUpdated_at() {
        return updated_at;
    }

    public void setUpdated_at(Date updated_at) {
        this.updated_at = updated_at;
    }

    public String toString() {
        return Json.toJson(this, JsonFormat.tidy());
    }

    public NutMap getMap() {
        return new NutMap(toString());
    }
}
2 回复

报错信息: org.h2.jdbc.JdbcSQLException: Function "NUMERIC" not found;

check是关键字

添加回复
请先登陆
回到顶部