Create a ForeignKey for the columns in the Table.

Namespace:  NHibernate.Mapping
Assembly:  NHibernate (in NHibernate.dll)

Syntax

Visual Basic (Declaration)
Public Function CreateForeignKey ( _
	keyName As String, _
	columns As IList, _
	referencedClass As Type _
) As ForeignKey
C#
public ForeignKey CreateForeignKey(
	string keyName,
	IList columns,
	Type referencedClass
)
Visual C++
public:
ForeignKey^ CreateForeignKey(
	String^ keyName, 
	IList^ columns, 
	Type^ referencedClass
)
JavaScript
function createForeignKey(keyName, columns, referencedClass);

Parameters

keyName
Type: System..::.String
columns
Type: System.Collections..::.IList
An IList of Column objects.
referencedClass
Type: System..::.Type

Return Value

A ForeignKey for the columns in the Table.

Remarks

This does not necessarily create a ForeignKey, if one already exists for the columns then it will return an existing ForeignKey.

See Also