Does OA support custom columns?

2 posts, 0 answers
  1. Dallas Sehlhorst
    Dallas Sehlhorst avatar
    19 posts
    Member since:
    Feb 2006

    Posted 01 Dec 2009 Link to this post

    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 :  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:

    Thanks for everyone's time!

  2. Jordan
    Jordan avatar
    547 posts

    Posted 04 Dec 2009 Link to this post

    Hello Dallas Sehlhorst,

    Unfortunately Open Access does not currently support expression / calculated / formula columns, so you will not be able to do optimization that you mention this way.
    What you could do however, is create an optimized query as a stored procedure in the data base and then use this stored procedure with Open Access.

    Sincerely yours,
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. DevCraft banner
Back to Top