-->
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: @hibernate.generator-param doesn't generate the param name
PostPosted: Tue Jan 16, 2007 3:05 pm 
Newbie

Joined: Tue Jan 16, 2007 2:56 pm
Posts: 4
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version: 3

I have the following xdoclet in my POJO and I'd like to create the mapping file to include such info, but the generated mapping file missed the attribute name.

My xdoclet:

* @hibernate.id
* generator-class="util.AutoNumberFactory"
* type="java.lang.Integer"
* column="MyColumn"
*
* @hibernate.generator-param
* name="key"
* value="fruits"


Generated mapping file is:

<id
name="id"
column="MyColumn"
type="java.lang.Integer"
>
<generator class="util.AutoNumberFactory">
<param>fruits</param>
<!--
To add non XDoclet generator parameters, create a file named
hibernate-generator-params-blah.xml
containing the additional parameters and place it in your merge dir.
-->
</generator>
</id>



The correct param line should be:
<param name="key">fruits</param>

The "key" attribute is missing. Is this a bug or I did something wrong here?

Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 24, 2007 11:19 am 
Newbie

Joined: Tue Jan 16, 2007 2:56 pm
Posts: 4
It turns out that I didn't add the hibernate version in the xdoclet task. The default is a version below 2.0. Once I added that, the parameter attribute is created properly.


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.