public void Save_WhenEntityReferencesTransientInstance_WillThrowImmediately()
        {
            Customer c = Om.CreateCustomer();
            Order    o = Om.CreateOrder();

            //Order now has a reference to a transient (unsaved) Customer
            o.Customer = c;
            var ex = Assert.Throws <PropertyValueException>(() => Nh.CurrentSession.Save(o));

            Assert.That(ex.Message, Is.StringContaining("not-null property references a null or transient value"));
        }