![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
hibernate
小刘童鞋爱健身
爱健身的小刘!
展开
-
hibernate 的三种查询方式
hibernate 的三种查询方式温馨提示:若非做java相关业务这一块的战友,直接用最简单话语的点评即可,不用理会具体的技术细节。1.标准化对象查询: Criteria(面向对象的条件查询对象) 2.HQL:Hibernate 面向对象的查询语言,语法类似SQL3.原生的sql查询:原生态SQL语句方式一:标准化对象查询:criteria查询(1)一个简单的例子package com.te...原创 2018-04-12 19:03:43 · 197 阅读 · 0 评论 -
hql查询语句报错处理
若非java相关的战友,直接点评即可,无需仔细阅读文章org.springframework.scheduling.quartz.JobMethodInvocationFailedException: Invocation of method 'execute' on target class [class com.znz.util.NodeResScheduler] failed; nested...原创 2018-05-03 09:32:00 · 1066 阅读 · 0 评论 -
报错问题解决:org.hibernate.ObjectNotFoundException
若非java这一块相关的战友,直接点评即可,无需阅读文章报错:18-05-29 14:19:32 INFO DefaultLoadEventListener:160 - HHH000327: Error performing load command : org.hibernate.ObjectNotFoundException:No row with the given identifier ...原创 2018-05-30 13:24:11 · 5348 阅读 · 0 评论 -
报错问题解决:net.sf.json.JSONException: There is a cycle in the hierarchy!
若非java这一块相关的战友,直接点评即可,无需阅读文章报错问题:net.sf.json.JSONException: There is a cycle in the hierarchy! atnet.sf.json.util.CycleDetectionStrategy$StrictCycleDetectionStrategy.handleRepeatedReferenceAsObject(Cy...原创 2018-05-30 13:53:04 · 902 阅读 · 0 评论 -
hibernate查询数据,单位转换时数据清0问题解决
一、问题描述对于hibernate,从数据库查询出数据的时候,如果涉及到数据的单位转换等,需要对于数据重新设置(setValue场景)的操作,目的是为了传递到页面进行zhan展示。但是你会发现你传递到页面之后,数据库的数据变成0了。 二、代码分析(1)原本的代码 public String listAll(){ try{ String condit...原创 2018-11-22 11:58:50 · 466 阅读 · 0 评论 -
herbinate no session问题解决
一、问题分析报错问题:Hibernate4 No Session found for current thread如图,看到报了no sessioncuo错误:第一步:查询对应的service层的注解是这个:第二步,看到application.xml里面对应的是sessionFactory 第三步,看到sessionFactory对应的库是计算库(Mysql的其...原创 2018-11-22 19:59:06 · 172 阅读 · 0 评论