Incorrect Syntax near “?” : Nhibernate Generated Query
问题 I am getting problem while working with positional parameters in Nhbernate. Criteria GroupProperty is emitting sql with both named and positional variables. This statement: session.CreateCriteria(typeof(MatchStageFrom)) .SetProjection(Projections.GroupProperty( Projections.SqlFunction("substring", NHibernateUtil.String, Projections.Property("LastName"), Projections.Constant(0), Projections.Constant(1)) ) ); is producing this SQL: SELECT substring(this_.LAST_NAME, @p0, @p1) as y0_ FROM MATCH