Eduard Baraniak
Eduard Baraniak

Reputation: 431

Fluent NHibernate or NHibernate for complicated database with complicated relations

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?

Upvotes: 3

Views: 314

Answers (2)

Andrey Agibalov
Andrey Agibalov

Reputation: 7694

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.

Upvotes: 1

Nathan Fisher
Nathan Fisher

Reputation: 7941

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.

Upvotes: 6

Related Questions