MonoRail & ActiveRecord tips

by benl

Adam Esterline has posted a bunch of MonoRail & ActiveRecord tips over on his blog. Some of the detail is fairly standard stuff but I learned a few things: MARS on SQL Server 2005 being one of them.

One thing I would add to the ActiveRecord tips is be mindful of lazy-loading on collection mappings. Especially now we have DetachedCriteria and the ability to be explicit about fetching strategies. Lazy-loading big lists can be pretty disastrous to application performance when used in the wrong place. For example: when traversing every node of a persistent object graph and touching unloaded collections.

Take a look at the NHibernate performance docs for more information.