7 Mar
2009

What I Really, Really, Really Like About Using Fluent NHibernate

Reusable Mappings Something that slightly bothered me with the XML mappings of NHibernate, is the fact that some things need to be configured over and over again. Behold the following two mapping files: Catalog: <class name=”Catalog” table=”`Catalog`” optimistic-lock=”version”> <id name=”Id” column=”Id” type=”Guid”> <generator class=”guid.comb” /> </id> <version column=”Version” name=”Version” /> <property name=”Name” length=”100″ type=”String”> <column […]

Read More
25 Jan
2009

NHibernate and Future Queries

Category:UncategorizedTag: :

As some of you already know, i’m a big fan of avoiding excessive roundtrips by batching queries and/or service calls. For NHibernate, i wrote the QueryBatcher class which makes this pretty easy to do. Ayende recently added a much easier approach for this to NHibernate. Take a look at the following code:             […]

Read More
23 Nov
2008

Populating Entities From Stored Procedures With NHibernate

A short while ago we needed to fetch the data for some entities through a stored procedure for performance reasons. We already use NHibernate in the typical way to fetch and modify the data of this entity type, but we just wanted something so we could also use the resultset of the stored procedure to […]

Read More
23 Nov
2008

NHibernate Fact when Saving a Transient Entity with Second Level Caching Enabled.

After attending the Advanced NHibernate workshop at the Kaizen Conference, I started to do some experimenting with NHibernate in order to gather more in dept knowledge about my favorite ORM tool. A topic that quite interests me about NHibernate, is its support for caching. NHibernate currently comes with 5 different caches: Identity map (Session) Entities […]

Read More
16 Nov
2007

NHibernate IQuery to ISQLQuery Black Magic

Category:UncategorizedTag: , :

Let me start with a warning. I really can’t recommend that you do what I am about to tell you. However the problems that led me to do something crazy are certainly worthy of discussion. And the solution that I employed itself is most definitely ‘interesting’ (that’s a euphemism) We refactored our application this week […]

Read More