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.  [ 1 post ] 
Author Message
 Post subject: accessing <any> property from HQL
PostPosted: Wed Aug 05, 2009 3:45 am 
Beginner
Beginner

Joined: Fri Sep 28, 2007 9:50 pm
Posts: 34
I have the following class mapping:

Code:
<class name="Category">
   <id name="ID"><generator class="native"/></id>
   <any name="ConcreteCategory" cascade="all-delete-orphan" id-type="Int32" meta-type="String" access="field.camelcase">
      <meta-value class="PlainCategory" value="PlainCategory"/>
      <meta-value class="PlainContext" value="PlainContext"/>
      <meta-value class="PlainResource" value="PlainResource"/>
      <column name="CategoryType" not-null="true"/>
      <column name="ConcreteCategoryID" not-null="true"/>
   </any>
...

The ConcreteCategory property is of type IConcreteCategory, which has a Title property. My question is: how can I access that Title property in an HQL query? Hibernate doesn't seem to implicitly know this <any> property's type. Can it be clued into the type and its available properties? I'm guessing the answer is 'no', but I'm hoping to be surprised by a 'yes'.


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

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.