-->
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.  [ 2 posts ] 
Author Message
 Post subject: Dynamic Instantiation
PostPosted: Thu Sep 16, 2004 3:00 am 
Newbie

Joined: Thu Sep 16, 2004 2:35 am
Posts: 1
Hi all -

I'm trying to get a list of org.apache.struts.util.LabelValueBean populated through dynamic instantiation:

return session.createQuery(
"select new LabelValueBean(topic.topicName, topic.topicAuthor) "
+ "from TopicDimension topic "
+ "order by topic.topicName")
.list();

HIA says that LabelValueBean doesn't have to be known to Hibernate. How does Hibernate know where to find this class?

I've tried fully qualifying LabelValueBean in the above statement. Can anyone help?

Thanks,
Tony


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 16, 2004 3:03 am 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
what happens with your query?

return session.createQuery(
"select new LabelValueBean(topic.topicName, topic.topicAuthor) "
+ "from TopicDimension topic "
+ "order by topic.topicName")
.list();

_________________
Anthony,
Get value thanks to your skills: http://www.redhat.com/certification


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