-->
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.  [ 3 posts ] 
Author Message
 Post subject: schemaexport and new index-many-to-many xdoclet tag
PostPosted: Fri Jan 30, 2004 7:00 pm 
Newbie

Joined: Fri Jan 30, 2004 6:48 pm
Posts: 12
Hi,
I'm trying to use the index-many-to-many tag in xdoclet. Hibernate generates the hbm.xml from java just fine, but when I attempt to run the <schemaexport> ant task, I get the following error:
[schemaexport] ...(stack)...
[schemaexport] Caused by: org.xml.sax.SAXParseException: Attribute "type" must be declared for element type "index-many-to-many".
[schemaexport] ...(stack)...

I looked in the dtd and there is no mention of the "type" attribute for index-many-to-many.
Then, I looked in my generated hbm.xml file and saw the following: (!)
<map
...
>

<key
...
/>

<index-many-to-many
class="(my fully qualified class)"
type="user_id"
/>

<many-to-many
class="(class)"
column="channel_id"
outer-join="auto"
/>

</map>

note the presence of the "type" attribute that <schemaexport> is claiming is missing, in the place of what I expected to be a "column" attribute.

any idea what's going on here?
I'm using hibernate 2.1, xdoclet 1.2 (final)

thanks in advance
Justin


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 30, 2004 8:49 pm 
Newbie

Joined: Fri Jan 30, 2004 6:48 pm
Posts: 12
I think I have it figured out. The xdoclet hibernate docs (incorrectly?) say that the hibernate.index-many-to-many tag requires the "column" attribute. The dtd does not agree with this, so when I tried removing the column attrib, everything worked (so far). So there is a discrepancy between the docs and the code/dtd, but I'm not sure which is correct, being a newcomer to Hibernate.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 31, 2004 7:23 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Always trust the DTD. Hibernate core does.

_________________
Emmanuel


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