-
ssh中执行真确的sql报错有关问题
ssh中执行真确的sql报错问题publicbooleanlogin(StringuserName,StringuserPWD){ Listlist=null; finalStringsql="select*from[nice_dw].[dbo].USERINFOuwhereu.user_login_name='"+userName_temp+"'andu.user_pwd='"+user...
179
热度 -
ssh中执行真确的sql报错有关问题
ssh中执行真确的sql报错问题publicbooleanlogin(StringuserName,StringuserPWD){ Listlist=null; finalStringsql="select*from[nice_dw].[dbo].USERINFOuwhereu.user_login_name='"+userName_temp+"'andu.user_pwd='"+userPW...
2789
热度 -
SSH整合,hibernate注解配置,无hbm.xml,映射出现有关问题
SSH整合,hibernate注解配置,无hbm.xml,映射出现问题刚接触SSH,想模仿着写个项目,没有hbm.xml实体类:packagecn.com.car.base.entity;importjava.io.Serializable;importjavax.persistence.Column;importjavax.persistence.Entity;importjavax.persi...
137
热度 -
Hibernate(10)HQL查询二
Hibernate(十)HQL查询二一、数据库的emp名和dept表建立持久化类和配置文件,可以用MyEclipse直接生成持久化类packageentity;importjava.util.Date;publicclassEmpimplementsjava.io.Serializable{//FieldsprivateShortempno;privateDeptdept;privateStrin...
17
热度 -
hibernate hql 去反复用法
hibernatehql去重复用法 hibernatehql中去重复的方法是用distinct,用法就是加在select之后,比如selectdistinctp.idfrompersonp引用当然也可以new一个对象的时候使用distinctselectdistinctnewPerson(id,name,sex)
479
热度 -
org.hibernate.PropertyAccessException: Null value was assigned to a property of解决办法
org.hibernate.PropertyAccessException:NullvaluewasassignedtoapropertyofHTTPStatus500- -------------------------------------------------------------------------------- typeExceptionreport message d...
2060
热度 -
Hibernate(HQL) 奇异的count()函数
Hibernate(HQL)怪异的count()函数 近日发现HQL中,count()函数要求还比较严格,举例说:1、count(1)报错HQL"> <queryname="getRecordCountById"> selectcount(1)asrecordCountfromKmc wherec.id=:id </query> 2、count(c.*)报错HQL"> ...
567
热度 -
MyEclipse + Hibernate时起动HQL Editor出错
MyEclipse+Hibernate时启动HQLEditor出错转:http://jeffen2006.iteye.com/blog/38362?前两天装了myeclipse5.0,碰到一个问题,打开HQLEditor出现错误。hibernate的配置都是正确的,测试程序都能通过,但是一打开HQL就出错,今天终于解决了。因为考虑到安全我们的数据库服务器是放在企业网外的,对内提供了一个IP,需要断...
15
热度 -
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
为什么有的时候我的hibernate老提示我publishTime无效啊?org.hibernate.exception.SQLGrammarException'>org.hibernate.exception.SQLGrammarException:couldnotinitializeacollectionbatch:[com.ltd.blog.bean.BlogBean.articles#&l...
7887
热度 -
hibernate出现错误org.hibernate.exception.SQLGrammarException:could not execute
hibernate出现异常org.hibernate.exception.SQLGrammarException:couldnotexecute今天给人调试hibernate,发现一个错误,耽误了老半天;错误提示:org.hibernate.exception.SQLGrammarException:couldnotexecutequery?org.hibernate.exception.Erro...
108
热度 -
急org.hibernate.MappingException: Unknown entity
急求助:org.hibernate.MappingException'>org.hibernate.MappingException:Unknownentity:异常错误如:org.hibernate.MappingException:Unknownentity:com.xdtech.platform.domain.model.user.xkq求高手帮忙解决,。。是不是还有什么地方没有配置到哦!!...
10361
热度 -
关于antlr.collections.AST.getLine()I的有关问题
关于antlr.collections.AST.getLine()I的问题在做ssh框架的项目时,用junit测试时出现了这个异常java.lang.NoSuchMethodError:antlr.collections.AST.getLine()I atorg.hibernate.hql.ast.HqlSqlWalker.generatePositionalParameter(HqlSqlWal...
603
热度 -
org.hibernate.PropertyAccessException: Null value was assigned to a property of解决方法
org.hibernate.PropertyAccessException:NullvaluewasassignedtoapropertyofHTTPStatus500- -------------------------------------------- typeExceptionreport message descriptionTheserverencounteredaninte...
590
热度 -
hibernate hql多表查询,该怎么处理
hibernatehql多表查询表1:Employee(id,name,department)表2:Advice(id,employeeId,departmentId)两表之间不设置外键selectE.id,E.namefromEmployeeEleftjoin(selectemployee_IdfromAdvicewheredepartment_Id=39006)AonA.employee_Id...
7666
热度 -
异常:org.hibernate.LazyInitializationException
hibernate多对一查询问题.请教高手我现在数据库有两个表:petInfo-----宠物信息(pet_ID是PK)petDiary-----宠物日记(diary_pet_id是PK,同时petInfo的pet_ID是外键)每个宠物可以写多个日记,也就是说每条宠物信息可以有多条日记信息跟它对应.本人想在查询一条日记信息的时候同时查询出相对应的宠物信息.对应关系要怎么配置啊?我是这样配置的,但是查...
255
热度 -
hibernate的hql语句异常, 求帮助
hibernate的hql语句错误,求帮助java查询语句Stringhql="selectNEWcom.hadventure.zonlolo.payment.dao.dto.WorkerPaymentRecord" +"(date(createTime)astypeDate,count(1)ascount,imgType)" +"fromPaymentRecord" +"...
79
热度 -
Hibernate中HQL话语的使用
Hibernate中HQL语句的使用本文主要使用一些测试方法来讲解HQL的具体应用 采用一对多的关系映射举例,两个类Dept{did,dname,emps},Emp{dept,eid,ename} Dept.hbm.xml中 <hibernate-mappingpackage="com.tarena.demo.po"> <classname="De...
427
热度 -
hibernate 用hql怎么实现子查询
hibernate用hql如何实现子查询请问HQL实现selecta.*from(select*fromdual)asawhere1=1类似的应该怎么写HQL呀如果a没实体类可行不color='#e78608'>------解决方案--------------------------------------------------------没实体类不行,除非你用sqlcolor='#e78608...
9158
热度 -
hibernate hql "=:"符号?解决思路
hibernatehql"=:"符号?whereorder.paid=falseandorder.customer=:customerandprice.product=productandcatalog=:currentCataloggroupbyorderhavingsum(price.amount)>:minAmount带:的都是什么意思?什么时候用到color='#...
10562
热度 -
hibernate3 支配weblogic10.3报错
hibernate3部署weblogic10.3报错Hibernate3.jar的应用,被部署到weblogic10.3上后,抛出异常org.hibernate.QueryException:ClassNotFoundException:org.hibernate.hql.ast.HqlToken[fromhbm.pojo.Areawherecode=:code] 解决方法: 1、在hiber...
302
热度