Must-to-know before diving into NHibernate

2007 November 6
by Frank Mao

Our company won’t allow developers directly write data into tables, everything must through stored procedure. Although hibernate does support sql-insert, sql-update and sql-delete in mapping file, but please keep in mind what Ayende said,

The disadvantages – You take away from NHibernate the ability to comprehend the structure of the tables, this mean that it can’t do joins, eager fetching, etc. This is extremely important capability that just vanished. Likewise for queries, NHibernate’s abilities to query your objects is being severly limited using this method of operation.

It seems ActiveRecord combined domain layer and data access layer together, which might cause problem when unit-testing. Jay found a way to use stub to unit-test ActiveRecord based on ActiveRecord::ConnectionAdapters::Column. But does dotnet have similar object? Don’t know, is that a reason why Active Record is not very popular in dotnet community?


No comments yet

Leave a Reply

Note: You can use basic XHTML in your comments. Your email address will never be published.

Subscribe to this comment feed via RSS