Many-to-Many Mapping

NHibernate Mapping Samples – 50 Samples of NHibernate Mapping

NHibernate is a widely used open-source ORM solution for .NET Framework. It is well-known for its great flexibility in mapping .NET classes to database tables, because it supports most kinds of such mapping ever needed by developers. However, its is also well-known for its complex mapping both fluent and XML. To help beginner developers to get acquainted with NHibernate mapping, Devart releases NHibernate Mapping Samples application, which demonstrates 50 different mapping cases and how they are mapped using both fluent and XML mapping.

(more…)

Support of Many-to-Many Mapping for Component Navigation Properties in Entity Developer

This article explains and gives a practical example of how support of сomponent navigation properties is implemented in Entity Developer for NHibernate.
Support of this functionality includes the possibility of detaching to a complex type for further reusability not only scalar entity properties but also navigation properties with subsequent customization of complete mapping at the level of private mapping of a certain property with type equal to complex type of a certain entity.

There are several ways of component navigation properties mapping in NHibernate:

  • Many-to-one;
  • One-to-many;
  • One-to-one;
  • Many-to-many.

In this article we will consider many-to-many mapping of сomponent navigation properties.
To find out more about the rest of the types of сomponent navigation properties mapping, see the article devoted to them here.
(more…)