java - hibernate 中定义的变量名一定和数据库字段名相同吗?
迷茫
迷茫 2017-04-17 15:45:43
0
1
323

数据库的字段要求是拼音缩写,可是这太难理解。想把如下的BYLLL换成容易理解的英文单词,目前数据库内部不允许更改字段名,能在Java层面更改变量名而不更改字段名吗?

@Entity
@Table(name = "DoctorInfoCenter")
public class InfoCenter extends AbstractVO {

    private static final long serialVersionUID = 1L;

    private Long BYLLL;
    
    public Long getBYLLL() {
        return BYLLL;
    }

    public void setBYLLL(Long BYLLL) {
        this.BYLLL = BYLLL;
    }
}
迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

reply all(1)
阿神

I thought of a way, @Column(name = "adress", length = 800) just add this comment

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!