public void Can_Save_and_Load_Old_Aliased_References()
        {
            var customer = new OldAliasedCustomer
            {
                Name           = "Customer 1",
                PrimaryAddress = new OldAliasedCustomerAddress
                {
                    AddressLine1 = "1 Humpty Street",
                    City         = "Humpty Doo",
                    State        = "Northern Territory",
                    Country      = "Australia"
                },
            };

            db.Save(customer);

            Assert.That(customer.Id, Is.GreaterThan(0));
            Assert.That(customer.PrimaryAddress.QO_CustomerId, Is.EqualTo(0));

            db.SaveReferences(customer, customer.PrimaryAddress);
            Assert.That(customer.PrimaryAddress.QO_CustomerId, Is.EqualTo(customer.Id));

            var dbCustomer = db.LoadSingleById <OldAliasedCustomer>(customer.Id);

            dbCustomer.PrintDump();

            Assert.That(dbCustomer.PrimaryAddress, Is.Not.Null);
        }
        public void Can_Save_and_Load_Old_Aliased_References()
        {
            var customer = new OldAliasedCustomer
            {
                Name = "Customer 1",
                PrimaryAddress = new OldAliasedCustomerAddress
                {
                    AddressLine1 = "1 Humpty Street",
                    City = "Humpty Doo",
                    State = "Northern Territory",
                    Country = "Australia"
                },
            };

            db.Save(customer);

            Assert.That(customer.Id, Is.GreaterThan(0));
            Assert.That(customer.PrimaryAddress.QO_CustomerId, Is.EqualTo(0));

            db.SaveReferences(customer, customer.PrimaryAddress);
            Assert.That(customer.PrimaryAddress.QO_CustomerId, Is.EqualTo(customer.Id));

            var dbCustomer = db.LoadSingleById<OldAliasedCustomer>(customer.Id);

            dbCustomer.PrintDump();

            Assert.That(dbCustomer.PrimaryAddress, Is.Not.Null);
        }