HQL太长,报错怎么处理
getManagerHql =
select m.customID, u.userName from CstCustomManager m, SysUser
u where m.userID = u.ID and m.customID in (1207, 1208, 1209, 1210, 1211, 1212,
1213, 1214, 1215, 454, 1217, 1218, 1219, 1220, 1221, 1222, 1223, 1224, 1225,
1226, 1227, 1228, 1229, 1216, 8012, 1230, 1231, 1232, 1233, 1234, 1235, 1236,
1237, 1238, 1239, 1240, 1241, 1242, 1243, 1244, 1245, 1246, 1247, 1248, 1249,
1250, 1251, 1252, 1253, 1254, 1255, 1260, 1261, 1262, 1263, 1264, 1265, 1266,
1267, 1268, 1269, 1256, 1257, 1258, 1259.......); (....后面很长很长)
使用
getHibernateTemplate().find(getManagerHql)查询时抛异常
------解决方案--------------------把hql语句拷到数据库编辑器里面,先把查询条件删了,一步步调试,查询条件一个一个的加……
------解决方案--------------------报什么错呢???如果你把后面id 少给一点会不报错吗???这个一直没有试过。。