本文整理汇总了C#中NHibernate.Engine.JoinSequence.SetUseThetaStyle方法的典型用法代码示例。如果您正苦于以下问题:C# JoinSequence.SetUseThetaStyle方法的具体用法?C# JoinSequence.SetUseThetaStyle怎么用?C# JoinSequence.SetUseThetaStyle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NHibernate.Engine.JoinSequence
的用法示例。
在下文中一共展示了JoinSequence.SetUseThetaStyle方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateEntityJoin
public FromElement CreateEntityJoin(
string entityClass,
string tableAlias,
JoinSequence joinSequence,
bool fetchFlag,
bool inFrom,
EntityType type)
{
FromElement elem = CreateJoin(entityClass, tableAlias, joinSequence, type, false);
elem.Fetch = fetchFlag;
//if (numberOfTables > 1 && _implied && !elem.UseFromFragment)
// NH Different behavior: numberOfTables was removed because an
// implicit join is an implicit join even if it not come from a
// multi-table entity
if (_implied && !elem.UseFromFragment)
{
if (Log.IsDebugEnabled)
{
Log.Debug("createEntityJoin() : Implied entity join");
}
elem.UseFromFragment = true;
}
// If this is an implied join in a FROM clause, then use ANSI-style joining, and set the
// flag on the FromElement that indicates that it was implied in the FROM clause itself.
if (_implied && inFrom)
{
joinSequence.SetUseThetaStyle(false);
elem.UseFromFragment = true;
elem.SetImpliedInFromClause(true);
}
if (elem.Walker.IsSubQuery)
{
// two conditions where we need to transform this to a theta-join syntax:
// 1) 'elem' is the "root from-element" in correlated subqueries
// 2) The DotNode.useThetaStyleImplicitJoins has been set to true
// and 'elem' represents an implicit join
if (elem.FromClause != elem.Origin.FromClause || DotNode.UseThetaStyleImplicitJoins)
{
// the "root from-element" in correlated subqueries do need this piece
elem.Type = HqlSqlWalker.FROM_FRAGMENT;
joinSequence.SetUseThetaStyle(true);
elem.UseFromFragment = false;
}
}
return elem;
}