zoukankan      html  css  js  c++  java
  • Hibernate——property的access属性

    public class Customer implements Serializable {

        private static final long serialVersionUID = 1L;
        private Integer id;
        private String sex;
        private double salary;
        private Double comm;
        private String birth;
        public Integer getId() {
            return id;
        }
        public void setId(Integer id) {
            this.id = id;
        }
        public double getSalary() {
            return salary;
        }
        public void setSalary(double salary) {
            this.salary = salary;
        }
        public Double getComm() {
            return comm;
        }
        public void setComm(Double comm) {
            this.comm = comm;
        }
        public Customer() {
            super();
            // TODO Auto-generated constructor stub
        }
        public String getSex() {
            return sex;
        }
        public void setSex(String sex) {
            this.sex = sex;
        }    
    }

         <property name="comm"/>
            <!-- 类中没有birth的get set 方法 -->
            <property name="birth" type="date" access="field"/>
            
            <!-- 映射Java持久化类中不存在的属性,只要用于HQL中,当数据库中有某列,二实体中不存在 -->
            <property name="deptName" type="string" access="noop"/>

  • 相关阅读:
    对于字符串的重复字符的去除
    487-3279
    队列设计(转)
    动态创建JS
    前端技巧:禁止浏览器static files缓存篇(转)
    cas与NGINX整合(转)
    秒杀场景下MySQL的低效(转)
    html禁用缓存
    MD5随机盐值生成法
    SVN There are unfinished transactions detected
  • 原文地址:https://www.cnblogs.com/ly-radiata/p/4454299.html
Copyright © 2011-2022 走看看