Insert into child table in nhibernate 2.1.0
-
hello good gurus.I've hesitated a lot before posting here coz i've been doing research(some of the articles here are too advanced for me :) ) but righ now i don't have the choice.it' seems that forum.hibernate.org is pointing to jboss for some reasons i don't know so please... i'm new to nhibernate and i wanted to do a small application with 3 tables(i use 2 for now).table currency and table country here are the mapping files //country table mapping //currency table mapping the many to one relationship that country hold is an attribute of the type Currency in the country persistence class.Now while my test can_add_currency and can_add_country succeeded(i export the schema) i have null value in the table country on the field currency_id. here is the test code
[Test] public void can_add_new_country() { CountryManager cm = new CountryManager(); Country country = new Country(); //country.CurrencyId = CurrencyManager.GetCurrencyById(1); country.CurrencyId = new CurrencyManager().GetCurrencyById(1