當前位置: 首頁>>代碼示例>>C#>>正文


C# JoinSequence.SetUseThetaStyle方法代碼示例

本文整理匯總了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;
		}
開發者ID:NikGovorov,項目名稱:nhibernate-core,代碼行數:49,代碼來源:FromElementFactory.cs


注:本文中的NHibernate.Engine.JoinSequence.SetUseThetaStyle方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。