-->
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.  [ 5 posts ] 
Author Message
 Post subject: Getting Table name at Renderer
PostPosted: Wed Jan 14, 2004 3:58 pm 
Newbie

Joined: Thu Dec 04, 2003 3:10 pm
Posts: 9
Location: Rio de Janeiro, Brazil
Hi,


I want to generate some finders in my generated java files. One of them is findAll(). The syntax of the HQL should be "from <table-name> in class <class-name>".

The problem is that I didn't found how I could get the table name (in my case this name is little different from class name ex. class-name=project and table-name=projects).

The ClassMapping file has the method getClassName(), but I didn't found any getTableName().

Indeed, the FinderRenderer and that came with HibernateTools doesn't work in my case because it uses getClassName !!


So, is it possible to get the table name ?


Top
 Profile  
 
 Post subject: Re: Getting Table name at Renderer
PostPosted: Wed Jan 14, 2004 5:03 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
joaocm wrote:
"from <table-name> in class <class-name>".

Eh ?! What the hell is that SQL / HQL mismatch


Code:
from <class-name>

the 'in class' stuff is deprecated in hibernate 2.x and *should* not be used anymore.

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 14, 2004 5:25 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
you can't use tablenames in HQL?!

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 14, 2004 5:26 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
...so what do you need that for ?

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 15, 2004 10:53 am 
Newbie

Joined: Thu Dec 04, 2003 3:10 pm
Posts: 9
Location: Rio de Janeiro, Brazil
You are right !! It was a hibernate documentation version problem. Solved...

Sorry for the incovenience..


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 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.