idea.case.sensitive.fs=true

版权声明:本文为博主原创文章,未经博主允许不得转载的哦=。= https://blog.csdn.net/qq_15602635/article/details/83629362

1、创建idea.properties文件
touch ~/Library/Preferences/AndroidStudio3.2/idea.properties
2、写入 idea.case.sensitive.fs=true
3、重启AndroidStudio

阅读更多
换一批

@org.hibernate.annotations.Entity(dynamicUpdate = true, dynamicInsert = true)

09-24

为什么@org.hibernate.annotations.Entity(dynamicUpdate = true, dynamicInsert = true)不起作用?rn[code=Java]rnimport javax.persistence.Column;rnimport javax.persistence.Entity;rnimport javax.persistence.GeneratedValue;rnimport javax.persistence.JoinColumn;rnimport javax.persistence.ManyToOne;rnimport javax.persistence.Transient;rnimport org.compass.annotations.Searchable;rnimport org.compass.annotations.SearchableId;rnimport org.compass.annotations.SearchableProperty;rnimport org.hibernate.annotations.GenericGenerator;rnimport javax.persistence.Id;rnimport javax.persistence.Table;rnrn/**rn * @author QQ:330805206rn */rn@Entityrn@org.hibernate.annotations.Entity(dynamicUpdate = true, dynamicInsert = true)rn@Table(name = "t_admin")rn@Searchable(root = false)rnpublic class Adminrnrn @SearchableIdrn @Idrn @GeneratedValue(generator = "JackieGenerator")rn @GenericGenerator(name = "JackieGenerator", strategy = "native")rn private int id;rn rn // 用户名rn @SearchableProperty(name = "username")rn @Column(nullable = false)rn private String username;rn rn // 密码rn @Column(nullable = false)rn private String password;rn rn // 单位rn @ManyToOnern @JoinColumn(name = "department", nullable = false)rn private Department department;rn rn // 以下字段不映射到数据库rn @Transientrn private String departmentid;rn rn public int getId()rn rn return id;rn rn rn public void setId(int id)rn rn this.id = id;rn rn rn public String getUsername()rn rn return username;rn rn rn public void setUsername(String username)rn rn this.username = username;rn rn rn public String getPassword()rn rn return password;rn rn rn public void setPassword(String password)rn rn this.password = password;rn rn rn public Department getDepartment()rn rn return department;rn rn rn public void setDepartment(Department department)rn rn this.department = department;rn rn rn public String getDepartmentid()rn rn return departmentid;rn rn rn public void setDepartmentid(String departmentid)rn rn this.departmentid = departmentid;rn rnrn[/code]rnrn不管是插入还是更新,都是生成全部的sql,郁闷,请高手指点我!rn下面的dao的插入和更新代码rn[code=Java]rnpublic void createObject(T t)rn rn this.getHibernateTemplate().save(t);rn rn rn public void updateObject(T t)rn rn this.getHibernateTemplate().update(t);rn rn[/code]

没有更多推荐了,返回首页