Menu

#25 v0.9.6 net.sf.hibernate.QueryException: undefined alias: Hos

open
nobody
None
5
2003-11-24
2003-11-24
Anonymous
No

Using MySQL, I connect and then try to execute the
simplest of queries:

select Host from hosts

or

select `Host` from hosts

This is what the log tells me :

select Host from hosts
net.sf.hibernate.QueryException: undefined alias: Host
[select Host from hosts]
at
net.sf.hibernate.hql.PathExpressionParser.token(PathExpressionParser.java:110)
at
net.sf.hibernate.hql.ParserHelper.parse(ParserHelper.java:29)
at
net.sf.hibernate.hql.SelectParser.token(SelectParser.java:153)
at
net.sf.hibernate.hql.ClauseParser.token(ClauseParser.java:87)
at
net.sf.hibernate.hql.ClauseParser.end(ClauseParser.java:114)
at
net.sf.hibernate.hql.PreprocessingParser.end(PreprocessingParser.java:140)
at
net.sf.hibernate.hql.ParserHelper.parse(ParserHelper.java:30)
at
net.sf.hibernate.hql.QueryTranslator.compile(QueryTranslator.java:146)
at
net.sf.hibernate.hql.QueryTranslator.compile(QueryTranslator.java:133)
at
net.sf.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:352)
at
net.sf.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:330)
at
net.sf.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:1368)
at
net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1332)
at
net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1322)
at
net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1314)
at
net.sf.hibernator.HibernateConnection.query(HibernateConnection.java:188)
at
net.sf.hibernator.views.QueryView$QueryTask.run(QueryView.java:255)
at
org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:101)

Discussion

  • Emanuele P.

    Emanuele P. - 2003-12-15

    Logged In: YES
    user_id=931593

    I'd like to know if it is a really bug or a bad use of the
    application. The same problem happens to me connecting to
    MySQL, with Eclipse 2.1.0 and Hibernator 0.9.6.

     
  • Nobody/Anonymous

    Logged In: NO

    me too :(

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.