when i use hql to query many to many realationship query,
i find on i use Count function it is all return -1
hql = "select xxx from ...."
i delete "select xxx" Count is work right
but sometimes we nedd use union query , we can't remove "select xxx " because if program do not get whom array ,it's throw a excetpion. then we need create a new query ScalarQuery
当我使用多对多查询的时候发现一个有意思的问题.
select link from Link link,后面一些条件这个时候
使用count方法就没有办法得到 总的条数了.
只好去掉 select link 
但是有时候我们用联合查询的时候没有办法去掉 select 不然程序就不清楚你你要获得哪个了
只好多用一个查询了..
自己写count
Castle 最近使用碰到的问题.发到它论坛还没有回应
 
                    
                     
                    
                 
                    
                 
 
                
            
         
         浙公网安备 33010602011771号
浙公网安备 33010602011771号