This question is locked. New answers and comments are not allowed.
I would like to know if OpenAccess supports custom columns for data access. I am asking this in reference to NHibernate's Formula property. When you map a class property using Formula you can specify the exact SQL that needs to be generated to get the needed result. Please see Ayende's blog post about it at : http://ayende.com/Blog/archive/2009/04/07/nhibernate-mapping-ltpropertygt.aspx See point 5 for his explanation. In his example he is using it to count to total number of Posts with the given Post Id without having to generate a separate query.
I would like to do this to get the total number of rows to show in a grid for paging purposes. Right now I am doing 2 seperate queries, but if I can put "count(*) over ()" in the query it will speed it up by removing the first Count query.
Another way NHibernate does this is by using a custom dialect using RegisterFunction. Please see Ayende's blog at: http://ayende.com/Blog/archive/2007/04/27/Paged-data--Count-with-NHibernate-The-really-easy-way.aspx
Thanks for everyone's time!
I would like to do this to get the total number of rows to show in a grid for paging purposes. Right now I am doing 2 seperate queries, but if I can put "count(*) over ()" in the query it will speed it up by removing the first Count query.
Another way NHibernate does this is by using a custom dialect using RegisterFunction. Please see Ayende's blog at: http://ayende.com/Blog/archive/2007/04/27/Paged-data--Count-with-NHibernate-The-really-easy-way.aspx
Thanks for everyone's time!