Archive for the ‘NHibernate’ Category

Fluentmigrator is a really nice migration tool that allows you to tear your database up and down keeping version, please visit the project page for more info. Anyway, the other day I had to create a composite index, and I didnt know how,  the way to do that is: Create.Index(“Name_of_the_index_String”).OnTable(“Name_of_the_Table_String”) .OnColumn(“Column_Name_string”).Ascending() .OnColumn(“Other_Column_Name_string”).Ascending(); Looks kinda obvious […]


Had a DetachedCriteria, very simple,  I check it running with  profiler side by side  and I see loads of queries running. Why? The criteria was something like this  var criteria = DetachedCriteria.For<MyEntity>() .SetCacheable(true) .SetCacheRegion(CacheRegions.RarelyChanges) .SetFetchMode(“Things”, FetchMode.Eager) .AddOrder(Order.Asc(“Name”)); I was trying to cache a criteria for MyEntity and have an eager fetch mode for  Things ( a […]


Yesterday I was coding and I needed to create a criteria like ….Repository.FinOne(Restriccions.Eq(“Email”, email));… however I wanted to make sure that there was not prblems with caseingit turns out IgnoreCase exists and can be used this way 😀 Repository.FinOne(Restriccions.Eq(“Email”, email).IgnoreCase()); I was really happy to find this, thanks NHibernate in Action!


The most interesting thing today was an email from Manning with the new release of the EAP of Nhibernate in Action (still in chapter 3 😦 ) .On the plus side, first time I ever bother reading the table of contents in detail, and yes, I found an appendix called Introducing ActiveRecord and MonoRail, at […]


I ve been suing NH for a while now, but i never started a project from the begining or used purely nh (I mean without Castle Active Record) started to read NHibernate in Action ( the EAP edition) so let see how it goes.