Take the 2-minute tour ×

I have a databse with complicated relations. I need to know if is better for my project use Fluent NHIbernet or only NHibernate. I know than fluent is better for auto mapping etc. . But will i have some problems in future when I have complicated databes with realy complicated relaations. Have Fluent NHibernate some limitations. Have Fluent NHibernate some problems during configuration? Will be Fluent NHibernate slower as NHibernate?

share|improve this question
I'd hardly call that a big database. When you get into the hundreds of tables, or even thousands, I'd start to worry about performance, but only after seeing some code indicating you've tried them both. They're easy enough to compare. –  DarkBobG Oct 28 '11 at 13:04
Define complicated... –  Ivan Crojach Karačić Oct 28 '11 at 13:12
Yes sorry it is not big databes but i have complicated relations.. som i am asking if i will have a lot of data in databes and will do some complicated query... if will be diffrence in performance.. –  Eddy_Screamer Oct 28 '11 at 13:15
add comment

2 Answers

up vote 6 down vote accepted

someone correct me if im wrong, but I think under the hood fluent nhibernate creates the xml mapping files that get loaded into nhibernate.

You can configure fluent-nhibernate to handle both the ClassMap<> and the xml based .hbm.xml mapping files. If there are situations you run into that fluent-nhibernate cannot handle then you can drop back to the xml mapping files if needed. The advantage of the fluent-nhibernate mapping is that it is easier to refactor your POCO classes as you have compile time checking, where as the xml mappings you will only know if there is a problem at runtime.

share|improve this answer
add comment

The question is not constructive. The only difference between NH and FluentNH is XML binding definitions vs. in-code binding definitions. FluentNH only defines the schema, it does nothing to the ORM logic itself - it's still NHibernate.

share|improve this answer
add comment

Your Answer


