The EntitySpaces Community

Share and learn about the EntitySpaces Architecture.
Welcome to The EntitySpaces Community Sign in | Join | Help
in
Home Forums Photos

Crash doing an innerjoin query in latest beta

Last post 10-15-2007, 7:54 AM by Mike.Griffin. 1 replies.
Sort Posts: Previous Next
  •  10-15-2007, 7:48 AM 5854

    Crash doing an innerjoin query in latest beta

    Here's the  code:

    qA.Select(qA.FkUserID);

    qA.InnerJoin(qB).On(qB.RanchID == qA.FkRanchID);

    qA.Where(qB.FkRanchSubscriptionPlanID == 0);

    collA.Load(qA);    ==> CRASH!

    Exception message is "Given key is not in the dictionary"

  •  10-15-2007, 7:54 AM 5855 in reply to 5854

    Re: Crash doing an innerjoin query in latest beta

    Sorry, we need to change the sample code on the home page, use an alias on your query constructors like this:

    Code:
    CustomerQuery cust = new CustomerQuery("c");
    OrderQuery order = new OrderQuery("o");
    OrderItemQuery item = new OrderItemQuery("oi");
    
    cust.Select(cust.CustomerName, (item.Quantity * item.UnitPrice).Sum().As("TotalSales"));
    cust.InnerJoin(order).On(order.CustID == cust.CustomerID);
    cust.InnerJoin(item).On(item.OrderID == order.OrderID);
    cust.GroupBy(cust.CustomerName);
    cust.OrderBy("TotalSales", esOrderByDirection.Descending);
    
    CustomerCollection coll = new CustomerCollection();
    coll.Load(cust);
    
    

    Notice the first three lines in the above sample.

     


    EntitySpaces | Twitter | BLOG | Please honor our Software License
View as RSS news feed in XML