Page 1 of 1

how to debug nHibernate mappings?

Posted: Fri Dec 09, 2016 2:56 am
by AbleMods
I remember a long time ago somebody mentioned a way to log mapping errors that keep the project from spinning up.

I've added some custom tables, but I've messed something up in the nHibernate mappings. So I keep getting the dreaded "An association from the table <newtable> refers to an unmapped class..."

I can't find the mapping issue. And I can't figure out how to log those mappings in the nHibernate bootstrap to figure out the real issue.

Anyone remember how to log the nHibernate mappings at startup?

Re: how to debug nHibernate mappings?

Posted: Fri Dec 09, 2016 3:35 am
by AbleMods
Sigh. I finally found it after 90 minutes of digging...

Anyone wanna guess what the problem was?
An association from the table <tablename> refers to an unmapped class: CommerceBuilder.Baskets.Basket
TGIF.

Re: how to debug nHibernate mappings?

Posted: Sat Dec 10, 2016 2:13 am
by nadeem
Anyone wanna guess what the problem was?
The class name should have been CommerceBuilder.Orders.Basket NOT CommerceBuilder.Baskets.Basket. Am I right? :)

Re: how to debug nHibernate mappings?

Posted: Sat Dec 10, 2016 2:51 am
by AbleMods
We have a winner :)

It's the little things that get ya!