Note: this is a cross post from my own blog . This post is an exercise, similar to this and this previous posts about using NHibernate mapping by code new features present form version 3.2. The source inspiring it is an old post form Ayende , showing a non trivial requirement to map. Here the DB model...
Note: this is a cross post from my own blog . In this post we done some effort in automatically generate the mapping based on convention, but we miss a very common one: table names is usually the pluralized entity name. This is usually done by using an inflector. Thanks to Stack Overflow , I found this...
Note: this is a cross post from my own blog . Since version 3.2.0 NHibernate has an embedded strategy for mapping by code, that basically comes from Fabio Maulo ’s ConfORM . With some reading at this Fabio post, this other one , and this one too , I wrote my own sample just to see what we can do...
[This article was originally published on my personal blog here . I hereby grant myself permission to re-publish it on NHForge.org.] [Code for this article is available on GitHub here .] In this post, we’ll examine the ways that NHibernate supports the DateTime-related data types, including some new...
I can’t count with one hand, how many times I’ve seen this mapping in my few years of using nhibernate: < class name = " Profile " > < composite-id > < key-many-to-one name = " User " column = " UserId " class = " User " /> </ composite-id...
In part 1 we found out how to generate a mapping file using c# and Linq To XSD. In this post we will extend that to show the use of conventions. The first thing we need an automapping framework to do is to create a class element in our xml mapping file for each of the entity types in our project. We...
This is part 1 in a blog series about yet another method for configuring your NHibernate mappings in code and writing conventions. Although there are mature solutions for doing this like Fluent NHibernate , I have found that they have required me to learn a new API and set of conventions, and sometimes...
First, let me explain the title of this post. The Hibernate folks – you know, that NHibernate knock off written in the Java (pronounced “ex em el”) programming language – have a project called Envers. Among other things, It audits changes to entities, then allows you to easily...