用户登录
用户注册

分享至

hibernate exists用法

  • 作者: 闹够了没有wait
  • 来源: 51数据库
  • 2021-01-28
String hql = "SELECT count(*) FROM MyObject ob where ob.employee=? ";
Object[] paras = new Object[] { employee };
Long rCount = (Long)createQuery(hql, paras).uniqueResult();

再判断null等



  hibernate hql怎么才能使用类似数据库中的exists操作
string hql = "select count(*) from myobject ob where ob.employee=? ";
object[] paras = new object[] { employee };
long rcount = (long)createquery(hql, paras).uniqueresult();

再判断null等
软件
前端设计
程序设计
Java相关