Development With A Dot

Blog on development in general, and specifically on .NET

Sponsors

News

My Friends

My Links

Permanent Posts

Portuguese Communities

Browse by Tags

All Tags » O/RM (RSS)
Making Better Use of the NHibernate HiLo Generator
Introduction NHibernate’s HiLo (High-Low) id generation algorithm is one of the most commonly used, and for good reasons: It is database-independent, that is, does not rely on any database-specific functionality such as SQL Server’s IDENTITY and Oracle...
NHibernate Pitfalls: Aggregating Non-Nullable Numerical Values Without Records
This is part of a series of posts about NHibernate Pitfalls. See the entire collection here . When you are performing a LINQ query that aggregates non-nullable numeric values – Sum, Average, for example – and the query does not return any values, you...
NHibernate Connection Resiliency
Entity Framework 6 included a feature known as connection resiliency. Basically, what it says is, when EF is trying to connect to a database, it will try a number of times before giving up. After each unsuccessful attempt, it will wait some time and then...
NHibernate Pitfalls: Outer Joins of Unrelated Entities
This is part of a series of posts about NHibernate Pitfalls. See the entire collection here . NHibernate does not support outer (left, right, full) joins in most of its querying APIs, namely, Criteria, Query Over, LINQ and HQL. Of course, LINQ is translated...
Custom NHibernate Criteria Projections
I recently had the need to investigate a way to do some complicated projections with Criteria queries and I was faced with what seems a common problem: being able to fully select the properties of the root entity of the criteria. An issue has been raised...
NHibernate Fluent Validation
Some time ago, I wrote a post on fluent validation for Entity Framework Code First. I think it is a cool concept, and I decided to bring it into NHibernate! In a nutshell, what I want to be able to achieve is something like this: 1: var validation = sessionFactory...
On NHibernate Performance
I noticed a flaw here. Will update the numbers in the next days. Introduction Every once in a while, someone comes up with a benchmark comparing O/RM tools. This time, it was my friendly neighbor at weblogs.asp.net , Frans Bouma , here and here . Nothing...
NHibernate Pitfalls: Table Schema
This is part of a series of posts about NHibernate Pitfalls. See the entire collection here . NHibernate has a schema attribute on HBM XML mappings and a Schema() method on fluent configuration that allows you to specify the schema for your objects. Therefore...
Minimum NHibernate Code
Sometimes people complain that NHibernate is difficult. Although NHibernate offers a lot of options when compared with other O/RMs, I don’t fully agree with this. Just as an example, all that it takes to setup NHibernate and perform all the mappings,...
Delete By Id in NHibernate
NHibernate allows executable queries, that is, plain old UPDATEs , INSERTs and DELETEs . This is great, for example, for deleting an entity by its id without actually loading it. Note, that the following won’t give you that: 1: session.Delete(session...
More Posts Next page »