I've got what I think of as a relatively simple hql query, but it's throwing an exception that doesn't seem to make sense to me...
When I execute the query (embedded in the exception details) I get the following exception:
Quote:
[14828] [NHibernate]
[14828] QueryException
[14828] Incorrect query syntax [SELECT new PAPA.Types.InputProfile( i, i.ParentUser.id) FROM Papa.Framework.Core.Entities.InputProfile i WHERE (i.Deleted = false) AND (i.InputInterface = :InputInterfaceFilter) AND (i.ParentUser.id = :UserFilter)]
[14828] at NHibernate.Hql.QueryTranslator.Compile()
[14828] at NHibernate.Hql.QueryTranslator.Compile(ISessionFactoryImplementor factory, IDictionary replacements, Boolean scalar)
[14828] at NHibernate.Impl.SessionFactoryImpl.GetQuery(String queryString, Boolean shallow)
[14828] at NHibernate.Impl.SessionImpl.GetQueries(String query, Boolean scalar)
[14828] at NHibernate.Impl.SessionImpl.Find(String query, QueryParameters parameters)
[14828] at NHibernate.Impl.QueryImpl.List()
[14828] at Papa.Framework.Core.Query.List() in C:\Documents and Settings\Symon\My Documents\Visual Studio Projects\Xpedite\PAPA\Papa.Framework.Core\Query.cs:line 191
[14828] [mscorlib]
[14828] ArgumentException
[14828] Item has already been added. Key in dictionary: "i" Key being added: "i"
[14828] at System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add)
[14828] at System.Collections.Hashtable.Add(Object key, Object value)
[14828] at NHibernate.Hql.FromParser.Token(String token, QueryTranslator q)
[14828] at NHibernate.Hql.ClauseParser.Token(String token, QueryTranslator q)
[14828] at NHibernate.Hql.PreprocessingParser.Token(String token, QueryTranslator q)
[14828] at NHibernate.Hql.ParserHelper.Parse(IParser p, String text, String seperators, QueryTranslator q)
[14828] at NHibernate.Hql.QueryTranslator.Compile()
[14828]
It's saying that the key 'i' has already been added...where!?! I've got plenty of other queries that are similar and I've never seen this before.
Anyone got any ideas as to what's going wrong?
Symon.