for {pos.*}
NullReferenceException. object reference not set...
ISqlLoadable persister = context.GetEntityPersisterByAlias(aliasName);
persister us null for many-to-many join
Code:
" at NHibernate.Loader.Custom.Sql.SQLQueryParser.ResolveProperties(String aliasName, String propertyName)\r\n at NHibernate.Loader.Custom.Sql.SQLQueryParser.ResolveCollectionProperties(String aliasName, String propertyName)\r\n at NHibernate.Loader.Custom.Sql.SQLQueryParser.SubstituteBrackets()\r\n at NHibernate.Loader.Custom.Sql.SQLQueryParser.Process()\r\n at NHibernate.Loader.Custom.Sql.SQLCustomQuery..ctor(INativeSQLQueryReturn[] queryReturns, String sqlQuery, ICollection`1 additionalQuerySpaces, ISessionFactoryImplementor factory)\r\n at NHibernate.Engine.Query.NativeSQLQueryPlan..ctor(NativeSQLQuerySpecification specification, ISessionFactoryImplementor factory)\r\n at NHibernate.Engine.Query.QueryPlanCache.GetNativeSQLQueryPlan(NativeSQLQuerySpecification spec)\r\n at NHibernate.Impl.SessionFactoryImpl.CheckNamedQueries()\r\n at NHibernate.Impl.SessionFactoryImpl..ctor(Configuration cfg, IMapping mapping, Settings settings, EventListeners listeners)\r\n at NHibernate.Cfg.Configuration.BuildSessionFactory()\r\n at "
it is generated when trying to build session factory.
works fine for many-to-one return-join {address.*} in the same query (when removing many-to-many).
Seem to me samples was for one-to-many