-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: HQL Exception when using hibernate console
PostPosted: Tue May 03, 2005 1:44 am 
Senior
Senior

Joined: Wed Dec 17, 2003 4:24 am
Posts: 188
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

3.0.1 product

<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<hibernate-mapping>
<!--
Auto-generated mapping file from
the hibernate.org cfg2hbm engine
-->
<class
name="test.Counter"
table="counter"
catalog="lportal"
>
<id
name="Name"
type="java.lang.String"
>
<column name="name" length="100" not-null="true" unique="true" sql-type="varchar" />
<generator class="assigned" />
</id>

<property
name="CurrentId"
type="java.lang.Integer"
>
<column name="currentId" length="11" not-null="false" sql-type="int" />
</property>

</class>
</hibernate-mapping>:


No

org.hibernate.QueryException:undefined alias:c[select c.Name from test.Counter as c;]

MySQL4.01 innoDB:

No

INFO:


Hi everyone:

After I config hibernate eclipse console(generate *.htm and *.java) ,I test it and I execute a HQL query in hibernate console.But I get the following exception:

Code:
org.hibernate.QueryException:undefined alias:c[select c.Name from test.Counter as c;]
org.hibernate.QueryException:undefined alias:c[select c.Name from test.Counter as c;]


But the HQL is correct indeed! What's wrong with the HQL ? Thks!
[/code]

_________________
You are not alone...


Top
 Profile  
 
 Post subject: :(
PostPosted: Tue May 17, 2005 8:31 pm 
Senior
Senior

Joined: Wed Dec 17, 2003 4:24 am
Posts: 188
Anyone who's eclipse hibernate console works property?

_________________
You are not alone...


Top
 Profile  
 
 Post subject: solution
PostPosted: Sat Aug 30, 2008 11:28 am 
Newbie

Joined: Sat Aug 23, 2008 1:30 pm
Posts: 4
am getting a similar error ...can u tell me wat is the solution

Thanks in advance


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 31, 2008 3:05 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
there should not be any ; in a hql statement

_________________
Max
Don't forget to rate


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.