O'Reilly logo

NHibernate 3 Beginner's Guide by Gabriel N. Schenker

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Summary

In this last chapter, we have learned a lot about the possible pitfalls when using NHibernate. We have discussed under what circumstances we can fall into traps and how we can avoid this.

Specifically, we covered:

  • How to avoid too verbose and inefficient mappings. We learned that lean mappings are easier to understand and maintain.
  • Common anti-patterns encountered in the usage of NHibernate. We learned that we should hardly ever use database-generated IDs and always explicitly defined the boundaries of our transactions.
  • The correct handling of lazy loading. We learned that under certain circumstances we need to give NHibernate a hint to avoid lazy loading altogether, we were shown how we can achieve that.
  • There exist situations where the domain ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required