An IIdentifierGenerator that uses the value of the id property of an associated object

Namespace: NHibernate.Id
Assembly:   NHibernate (in NHibernate)
Version: 1.2.0.4000

Syntax

Visual Basic (Declaration)
Public Class ForeignGenerator _
	Implements IIdentifierGenerator, IConfigurable
C#
public class ForeignGenerator : IIdentifierGenerator, IConfigurable
Visual C++
public ref class ForeignGenerator : IIdentifierGenerator, IConfigurable

Remarks

This id generation strategy is specified in the mapping file as

CopyC#
<generator class="foreign">
    <param name="property">AssociatedObject</param>
</generator>

The mapping parameter property is required.

Inheritance Hierarchy

System.Object
  NHibernate.Id.ForeignGenerator