public void RightWithFromSubQuery()
        {
            CustomerCollection coll = new CustomerCollection();
            coll.es.Connection.Name = "ForeignKeyTest";

            switch (coll.es.Connection.ProviderSignature.DataProviderName)
            {
                case "EntitySpaces.SQLiteProvider":
                    Assert.Ignore("RIGHT JOIN not supported.");
                    break;

                default:
                    CustomerQuery cq1 = new CustomerQuery("c1");
                    cq1.es.Top = 5;
                    cq1.Select(cq1.CustomerID, cq1.CustomerSub);
                    cq1.Where(cq1.Active == true);
                    cq1.OrderBy(cq1.CustomerID.Ascending);

                    CustomerQuery cq2 = new CustomerQuery("c2");

                    CustomerQuery cq3 = new CustomerQuery("c3");
                    cq3.Select(cq2);
                    cq3.From(cq1).As("cSub");
                    cq3.RightJoin(cq2).On(cq1.CustomerID == cq2.CustomerID && 
                        cq1.CustomerSub == cq2.CustomerSub);
                    cq3.Where(cq2.Active == true && cq1.CustomerID.IsNull());
                    cq3.OrderBy(cq2.CustomerID.Ascending);

                    Assert.IsTrue(coll.Load(cq3));
                    Assert.AreEqual(36, coll.Count);
                    break;
            }
        }