-->
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.  [ 3 posts ] 
Author Message
 Post subject: Composite-id class not showing in Eclipse's HQL results
PostPosted: Tue Nov 06, 2007 4:05 pm 
Beginner
Beginner

Joined: Wed May 23, 2007 1:07 pm
Posts: 28
I am new to Hibernate Tools, so I'm exploring its features in Eclipse.

I have a mapping like:

Code:
  <class name="TableC" table="tablec">
     <composite-id>
        <key-property name="version" column="version" />
        <key-many-to-one name="tableA" column="tablea_id" class="TableA" />
     </composite-id>
        <property name="propertyC" column="propertyc"/>   
  </class>


When I try the code "from TableC" in eclipe's HQL editor, I get a result, but I can only see the "propertyC" property, and not the composite-id.

On a composite-id that uses an ID class, I can see the IDClass name but can't access its properties (all of this in Eclipse's "properties" area of the Hibernate View).

Is this a feature of hibernate tools or is there a way to access the composite-id attributes on that area?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 07, 2007 5:46 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
hmm might be an oversight in the property view implementation.

put it in jira.

note: you can do "select a.id.version, a.id.tableA, a from TableC as a"
if you want

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 07, 2007 7:54 am 
Beginner
Beginner

Joined: Wed May 23, 2007 1:07 pm
Posts: 28
max wrote:
hmm might be an oversight in the property view implementation.

put it in jira.

note: you can do "select a.id.version, a.id.tableA, a from TableC as a"
if you want



Will do that. I believe I've found another bug:

in Eclipse, autocompletion of the "table" element in .hbm.xml files works. The problem is with capital letters. At least in PostgreSQL, for hibernate to work you need to write the table name in between `` (example, `TableName`).
Unfortunately, auto complete won't add the ``. If you manually add them, you'll lose the column names when writing the properties.

If you leave the table name without the ``, the query won't work (it will say it can't find tablename - with a small "t" and "n").


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