-->
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: "View" object for join queries
PostPosted: Thu Mar 03, 2005 2:19 pm 
Newbie

Joined: Thu Nov 18, 2004 9:28 pm
Posts: 11
Location: Costa Rica
I've been trying to perform a join query using the named query feature of hibernate 2. The problem is that I've been doing it with two aliases defined in the named query, one for each of the tables that are being joined; this works fine, the only issue is that the Collection returned contains arrays of two elements (one for each bean returned by the join).
I need to have a list of beans returned from the query, not a list of arrays of beans.

Given this I created a View class that is going to contain only the information that I need from the join, so I select the data using this bean, the problem is that when I try to run the query it throws a MappingException saying that there's "No persistor for: " my View class.

I guess that this may be caused by the lack of an hbm.xml file for this class, the problem is that this View is not going to map a specific table (actually I want it to map a part of one table and a part of other table!: a join!) ... is there a way of doing such mapping in hibernate?


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.