今天做修改保存功能时遇到了一个错误,具体错误信息如下:
org.springframework.orm.hibernate3.HibernateQueryException: spkbkt_nc_account_v2 is not mapped [from spkbkt_nc_account_v2 where 1=1 and id=? and is_delete != 'Y' ];
简单搜了一下,结果表明出现此错误可能有三个原因:
String searchSql = "from spkbkt_nc_account_v2 where 1=1 and id=? and is_delete != 'Y' ";
大致看一下,可以排除第2点,因为其他的都是没问题的,只有这个出了问题。
看下代码,检查一下1、3点,果然,第1点出了问题。这是我的实体类:
public class Spkbkt_indicator_mapping extends SpkBaseEntity<Spkbkt_indicator_mapping> {
找到了问题,修改一下SQL就可以啦。
String searchSql = "from Spkbkt_indicator_mapping where 1=1 and id=? and is_delete != 'Y' ";
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有