⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frompathexpressionparser.cs

📁 NHibernate NET开发者所需的
💻 CS
字号:
using NHibernate.Persister.Collection;
using NHibernate.Type;

namespace NHibernate.Hql.Classic
{
	/// <summary>
	/// FromPathExpressionParser
	/// </summary>
	public class FromPathExpressionParser : PathExpressionParser
	{
		public override void End(QueryTranslator q)
		{
			if (!IsCollectionValued)
			{
				IType type = PropertyType;
				if (type.IsEntityType)
				{
					// "finish off" the join
					Token(".", q);
					Token(null, q);
				}
				else if (type.IsCollectionType)
				{
					// default to element set if no elements() specified
					Token(".", q);
					Token(CollectionPropertyNames.Elements, q);
				}
			}
			base.End(q);
		}

		protected override void SetExpectingCollectionIndex()
		{
			throw new QueryException("illegal syntax near collection-valued path expression in from: " + CollectionName);
		}
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -