问题描述
org.hibernate.hql.ast.QuerySyntaxException:Unabletolocateappropriateconstructoronclass[com.bjpowernode.drp.base.domain.Client][selectnewClient(c.id,c.clientId,c.name,c.bankAccN,c.contactTel,c.address,c.zip,clevels)fromcom.bjpowernode.drp.base.domain.Clientcleftjoinc.clevelsclevelswherec.id=?]这是hql:Stringhql="selectnewClient(c.id,c.clientId,c.namec.bankAccN,c.contactTel,c.address,c.zip,clevels)fromClientcleftjoinc.clevelsclevelswherec.id=?";classClinet{privateStringname()privateSet<Clevel>clevels;...get**(){}set**(){}publicClient(intid,StringclientId,Stringname,StringbankAccN,intcontactTel,Stringaddress,intzip,Set<Clevel>clevels){super();this.id=id;this.clientId=clientId;this.name=name;this.bankAccN=bankAccN;this.contactTel=contactTel;this.address=address;this.zip=zip;this.clevels=clevels;}}classClevel{''''}
解决方案
解决方案二:
这个主要是没有找到构造方法仔细找下就可以了
解决方案三:
publicClient(intid,StringclientId,Stringname,StringbankAccN,intcontactTel,Stringaddress,intzip,Set<Clevel>clevels){super();this.id=id;this.clientId=clientId;this.name=name;this.bankAccN=bankAccN;this.contactTel=contactTel;this.address=address;this.zip=zip;this.clevels=clevels;}
解决方案四:
构造方法是有的,且属性与hql中的一致