This is a migrated thread and some comments may be shown as answers.

Kendo UI generated SQL queries with nHibernate

1 Answer 70 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ilkka
Top achievements
Rank 1
Ilkka asked on 09 Jul 2013, 10:15 AM
Hi,

I am using nHibernate as ORM and showing data to user with Kendo UI. I am retrieing data with nHibernate Query interface and then constructing Kendo UI DataSourceResult.

However I noticed quite strange thing when I observed the SQL queries that Kendo UI + nHibernate combination generates. It seems that for each data fetching two queries are made.

The first query simply queries how many rows the query will return. The second query fetches the actual data, but limits the results with SQL TOP keyword.

My question is that is this intended behavior? Can it be bypassed somehow?

/ IlkkaH

1 Answer, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 11 Jul 2013, 02:01 PM
Hello,

 Yes, this is the expected behavior. The first query is needed to get the total number of records. The second query retrieves the first page of the records.

Regards,
Atanas Korchev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
General Discussions
Asked by
Ilkka
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Share this question
or