-->
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: How to query dynamic-component
PostPosted: Mon Jul 05, 2004 1:12 pm 
Newbie

Joined: Mon Jul 05, 2004 1:11 pm
Posts: 3
Hi,

I would like to query a dynamic-component, is it possible? If it is, what is the syntax ?

Example:
<hibernate-mapping>
<class name="EventNodeWithHistoryBO" table="B_CUBE_HIST">
<id name="seq" column="SEQ">
<generator class="increment"/>
</id>
<dynamic-component name="dimensions">
<property name="d1" column="d1" type="string"></property>
<property name="d2" column="d2" type="string"></property>
</dynamic-component>
</class>
</hibernate-mapping>

I tried ..
session.find("from EventNodeWithHistoryData e where e.dimensions.d1 = 4")
But it fails to build a query.

Thanks
Tali


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 05, 2004 1:36 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Code:
from EventNodeWithHistoryBO e where e.dimensions.d1 = 4


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 06, 2004 2:59 am 
Newbie

Joined: Mon Jul 05, 2004 1:11 pm
Posts: 3
Hi,

I corrected it (from EventNodeWithHistoryBO) and I get the error
net.sf.hibernate.QueryException: dereferenced: eventnodew0_.dimensions.d1 [from com.bevents.application.eventaccess.server.bo.EventNodeWithHistoryBO e where e.dimensions.d1 =9071]

Any ideas?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 06, 2004 4:27 am 
Newbie

Joined: Mon Jul 05, 2004 1:11 pm
Posts: 3
I have upgraded to version 2.1.4 (2/6/2004) and it works!!!
Thanks
Tali


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.