-->
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: JOIN / SUBSELECT example in 7.6 of docs doesn't work
PostPosted: Tue Jul 24, 2007 1:12 pm 
Newbie

Joined: Thu Aug 31, 2006 2:37 pm
Posts: 2
Location: New York, NY
The following example is listed in the hibernate docs in chapter 7 under "7.6. More complex association mappings" However, this syntax does not work.

<join>
<key column="employeeId"/>
<subselect>
select employeeId, orgId
from Employments
group by orgId
having startDate = max(startDate)
</subselect>
<many-to-one name="mostRecentEmployer"
class="Organization"
column="orgId"/>
</join>

When I try I get the following exception:

Caused by: org.xml.sax.SAXParseException: Attribute "table" is required and must be specified for element type "join".


Is there a newer DTD I should be using which allows this? I am using:

http://hibernate.sourceforge.net/hibern ... ng-3.0.dtd


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.