Chapter 6. Advanced mapping concepts

This chapter covers

  • The NHibernate type system
  • Custom mapping types
  • Collection mappings
  • One-to-one and many-to-many associations

In chapter 3, we introduced the most important ORM features provided by NHibernate, including basic class and property mappings, inheritance mappings, component mappings, and one-to-many association mappings. We now extend these topics by turning to the more exotic collection and association mappings that allow you to handle trickier use cases. It’s worth noting that these more exotic mappings should only be used with careful consideration; it’s possible to implement any domain model using simpler component mappings (one-to-many associations and one-to-one associations). Throughout ...

Get NHibernate in Action now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.