how to debug nHibernate mappings?

For general questions and discussions specific to the AbleCommerce GOLD ASP.Net shopping cart software.
Post Reply
User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

how to debug nHibernate mappings?

Post by AbleMods » Fri Dec 09, 2016 2:56 am

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?
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Re: how to debug nHibernate mappings?

Post by AbleMods » Fri Dec 09, 2016 3:35 am

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.
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

nadeem
Captain (CAPT)
Captain (CAPT)
Posts: 258
Joined: Tue Jul 31, 2012 7:23 pm

Re: how to debug nHibernate mappings?

Post by nadeem » Sat Dec 10, 2016 2:13 am

Anyone wanna guess what the problem was?
The class name should have been CommerceBuilder.Orders.Basket NOT CommerceBuilder.Baskets.Basket. Am I right? :)

User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Re: how to debug nHibernate mappings?

Post by AbleMods » Sat Dec 10, 2016 2:51 am

We have a winner :)

It's the little things that get ya!
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

Post Reply