Create a new ICriteria, "rooted" at the associated entity, assigning the given alias and using the specified join type.

Namespace: NHibernate
Assembly: NHibernate (in NHibernate.dll) Version: 3.2.0.4000 (3.2.0.4000)

Syntax

C#
ICriteria CreateCriteria(
	string associationPath,
	string alias,
	JoinType joinType,
	ICriterion withClause
)
Visual Basic
Function CreateCriteria ( _
	associationPath As String, _
	alias As String, _
	joinType As JoinType, _
	withClause As ICriterion _
) As ICriteria
Visual C++
ICriteria^ CreateCriteria(
	String^ associationPath, 
	String^ alias, 
	JoinType joinType, 
	ICriterion^ withClause
)

Parameters

associationPath
Type: System..::..String
A dot-separated property path
alias
Type: System..::..String
The alias to assign to the joined association (for later reference).
joinType
Type: NHibernate.SqlCommand..::..JoinType
The type of join to use.
withClause
Type: NHibernate.Criterion..::..ICriterion
The criteria to be added to the join condition (ON clause)

Return Value

The created "sub criteria"

See Also