
SQL怎么装换为HQL 5
selecta.idasid,b.nameasname,a.nameasfiledName,a.remarkasremarkfromem_apiasbinnerjoine...
select a.id as id,b.name as name,a.name as filedName,a.remark as remark
from em_api as b inner join em_api_filed as a on a.api_id = b.id 展开
from em_api as b inner join em_api_filed as a on a.api_id = b.id 展开
1个回答
2015-05-21
展开全部
if (word != null)
{
if (StringUtils.isNotBlank(word.getName()))
{
dc.add(Restrictions.ne("name", "rrrr"));
}if(StringUtils.isNotBlank(word.getFormula())){
dc.add(Restrictions.ne("formula","rrr"));
}if(StringUtils.isNotBlank(word.getRemark())){
dc.add(Restrictions.ne("remark","rrrr"));
}
}
DetachedCriteria.forClass(SentimentWords.class);
这个的意思是查询整表。
add加条件。Restrictions是条件这里面有很多条件方法。比如eq是equal也就是=。ne是not equal也就是!=,le是< ge是>等等 很多
{
if (StringUtils.isNotBlank(word.getName()))
{
dc.add(Restrictions.ne("name", "rrrr"));
}if(StringUtils.isNotBlank(word.getFormula())){
dc.add(Restrictions.ne("formula","rrr"));
}if(StringUtils.isNotBlank(word.getRemark())){
dc.add(Restrictions.ne("remark","rrrr"));
}
}
DetachedCriteria.forClass(SentimentWords.class);
这个的意思是查询整表。
add加条件。Restrictions是条件这里面有很多条件方法。比如eq是equal也就是=。ne是not equal也就是!=,le是< ge是>等等 很多
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询