|
|
1
30
根据Hibernate参考:
所以当我使用
|
|
|
2
7
好的,LIKE运算符通常用于文本数据,即VARCHAR或CHAR列,并且您有数字
也许你可以试试地图
@Entity
public class User {
private Integer id;
private String idAsString;
@Id;
private Integer getId() {
return this.id;
}
private void setId(Integer id) {
this.id = id;
}
@Column(name="id", insertable=false, updatable=false)
private String getIdAsString() {
return this.idAsString;
}
private void setIdAsString(String idAsString) {
this.idAsString = idAsString;
}
}
那么查询将是:
|
|
|
africandrogba · 如何在表达式中进行算术运算? 8 年前 |
|
|
JoeyH · 在grails中对哪个域对象执行查询重要吗 8 年前 |
|
|
KnechtRootrecht · HQL自定义订单ASC和DESC 8 年前 |
|
|
Allloush · @事务性不使用HQL或SQL更新记录 8 年前 |
|
|
Ian Pert · 子字符串上的HQL联接 8 年前 |