NHibernate

NHibernate

NHibernate cache system. Part 1

31 December 2011 |

In this series of articles I will try to explain you how NHibernate cache system works and how it should be used in order to get the best performance/configuration from this product. Introduction  Architecture Cache Level 1 mechanism Load and Get, what’s the difference Session maintenance: Evict, Flush and Clear 2nd Level Cache...

NHibernate cache system. Part 2

31 December 2011 |

In the previous post we saw how the cache system is structured in NHibernate and how it works. We saw that we have different methods to play with the cache (Evict, Clear, Flush …) and they are all associated with the ISession object because the cache of level 1 is associated with the lifecycle of an ISession object. In this second article we will see how the second level cache works and how it is associated with the ISessionFactory object that is in charge of controlling this cache mechanism. Second Level cache architecture How does the second...

NHibernate cache system. Part 3

31 December 2011 |

In this series of articles we saw how the cache system is implemented in NHibernate and what can we do in order to use it. We also saw that we can choose a cache provider but we didn’t have a look yet at what providers we can use. I personally have my own opinion about the 2nd level cache providers available for NHibernate 3.2 and I am more than happy if you would like to share with me your experience about it. Below is a list of the major and the most famous 2nd level cache providers I...

Book Review: Architecting application for the enterprise.

30 December 2009 |

Good morning everybody, first of all I want to apologize for my absence in December. I am really sorry but I was ‘trying’ to deliver a component in my office and I was so busy and tired that I didn’t have time for the blog. Let’s start this ‘holiday’ posts with an interesting review of a software architecture book written by two friends of mine: Andrea Salatarello and Dino Esposito. The title is: Microsoft .NET: Architecting Applications for the Enterprise (PRO-Developer) (Paperback) available at Amazon.com for 29.69 USD. Chapters and sections. The book...

NHibernate, collection with composite-id.

19 March 2009 |

In the previous post we saw how to map an entity with a composite-id. Well but now if you have mapped an entity in this way and you need to create a collection of this entity or maybe you have a related child class that uses this primary keys … you are in trouble! The way to solve the problem is very easy. First of a short example to understand what I’m talking about: 1: class Foo { 2:...

NHibernate and the composite-id.

19 March 2009 |

I’m working with the new version (2.0 GA) of NHibernate. The problem I have encountered today is about the composite-id. Let’s say we have an entity that doesn’t have a personal id field. We don’t want to use the GUID or any other auto id generator class. We must implement the primary key logic in the corresponding table in the database. Now, imagine to have this table: Key Column Name SQL...