One day , I need use "group by " query,
but i don't know how to write it on ActiveRecord,

I try mony method, but i can't get the results. i am also post a thread to forum of caslte, but no one replay it ,may be it is so easy.
so ,  i redo my work. i found ,
i can use
ActiveRecord group by query            "select table.name,count(table.name) from Table table group by table.name order by table count(table.name) desc"
My gold, Is correct now.

ActiveRecord group by queryHqlBasedQuery query = new HqlBasedQuery(typeof(ActivityInfo), hql);
ActiveRecord group by query            
return ExecuteQuery(query);

How to get the data? like below
ActiveRecord group by query ArrayList list = o as ArrayList;
ActiveRecord group by query        
for(int i=0;i<list.Count;i++)
        }

and I found in activeRecord you can use SQL language to query, just set QueryLanguage to sql,

anthor method: Navtie Query
 

相关文章:

  • 2021-06-03
  • 2022-02-14
  • 2022-01-26
  • 2021-08-12
猜你喜欢
  • 2022-12-23
  • 2022-01-09
  • 2021-10-02
  • 2022-12-23
  • 2022-12-23
  • 2021-08-15
相关资源
相似解决方案