标签:http os 数据 问题 数据库 sql .net sp
hibernate的bug: https://hibernate.atlassian.net/browse/HHH-4956
解决办法:
添加别名
select max(max_pre_nights) ,max(max_post_nights) from package_pre_post_hotel where package_id = :packageId
添加别名后可以解决问题,如果SQL中的列名不是唯一的,最好都添加别名,比如 select a.id as a_id , b.id as b_id from tablea a, tableb b;
select max(max_pre_nights) as max_pre_nights,max(max_post_nights) as max_post_nights from package_pre_post_hotel where package_id = :packageId
Hibernate 查询结果与数据库中的数据不一致,布布扣,bubuko.com
标签:http os 数据 问题 数据库 sql .net sp
原文地址:http://www.cnblogs.com/elm5280/p/3916389.html