Generated Queries

2 posts, 0 answers
  1. Grant
    Grant avatar
    1 posts
    Member since:
    Mar 2009

    Posted 15 Dec 2010 Link to this post

    I submitted a ticket asking about this, but didn't hear back. So I was hoping maybe someone on the forums could answer.

    Watching the generated SQL generated by OpenAccess it appears that prior to filitering, OpenAccess selects every row from a table.

    For example, I see queries like this:

    SELECT a.[Code] AS COL?, a.[AmountBilledNow] AS COL?, a.[FooterText] AS COL?, a.[FullOrderAmount] AS COL?, a.[LoginPrefix] AS COL?, a.[NeedsLogin] AS COL?, a.[NeedsPIN] AS COL?, a.[SKUCode] AS COL?, a.[SalesFlowKey] AS COL?, a.[ShortSummary] AS COL?, a.[TermsURL] AS COL?, a.[ThemeId] AS COL?, a.[Title] AS COL? FROM [usp_OrderCode] a ORDER BY a.[Code]

    Generated when I have a statement like this:

    dbContext.OrderCodes.Where(oc => oc.Code == "test_order_code")

    When I turn the debug level to "all" I can verify that it has  definitely selected all rows from the table.

    Is this normal behavior?

    Thanks
  2. Serge
    Admin
    Serge avatar
    375 posts

    Posted 16 Dec 2010 Link to this post

    Hello Grant,

     So far we have been unable to reproduce this behaviour on our side. Would you mind continuing the conversation in the support ticket that you have opened.

    We will post the solution to the problem in this forum thread once found out.

    Greetings,
    Serge
    the Telerik team
    Accelerate your learning with industry's first Telerik OpenAccess ORM SDK. Download today.
  3. DevCraft banner
Back to Top