-->
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.  [ 4 posts ] 
Author Message
 Post subject: no setters/getters for fields outside properties grouping
PostPosted: Sat Nov 19, 2005 2:58 am 
Newbie

Joined: Tue Sep 28, 2004 2:03 pm
Posts: 9
Location: Fullerton, CA
Hi all,

I'm using the HibernateToolTask to generate code. Everything worked fine untill I added a properties element to group some of my properties. Now, the properties that aren't inside that grouping don't get corresponding getters and setters in the generated code. Is there a way I can tell the tool to include these fields (id and tags) in my code?

Thanks,
Brian


Hibernate version:
Hibernate 3.1.beta1, HibernateTools 3.1.0.beta1

Mapping documents:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<hibernate-mapping
package="com.mycompany.data.value">

<class name="Item">

<id name="id" type="java.lang.Long">
<generator class="hilo"/>
</id>

<set name="tags" table="itemtags" cascade="save-update">
<key column="item_id"/>
<many-to-many column="tag_id" class="Tag"/>
</set>

<properties name="item-data" unique="true">

<property name="name" type="string">
<meta attribute="use-in-equals">true</meta>
<meta attribute="use-in-tostring">true</meta>
</property>

<property name="description" type="string">
<meta attribute="use-in-equals">true</meta>
<meta attribute="use-in-tostring">true</meta>
</property>

<many-to-one name="account"
class="com.mycompany.data.value.Account"
column="account_id" not-null="true" cascade="save-update">
<meta attribute="use-in-equals">true</meta>
<meta attribute="use-in-tostring">true</meta>
</many-to-one>
</properties>
</class>

</hibernate-mapping>

Code between sessionFactory.openSession() and session.close():
no code, just doing hbm2java

Full stack trace of any exception that occurs:
no exception, just not getting setters/getters in my generated code

Name and version of the database you are using:
not that it matters, but MySql 3.xx

The generated SQL (show_sql=true):
no sql

Debug level Hibernate log excerpt:
no applicable logging


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 19, 2005 7:29 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
try with current cvs and if that does not work report in jira

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: cvs code has same problem
PostPosted: Sat Nov 19, 2005 10:09 pm 
Newbie

Joined: Tue Sep 28, 2004 2:03 pm
Posts: 9
Location: Fullerton, CA
Thanks for the reply Max. I take it from your response that the getters/setters should be there for my mapping. The code in cvs has the same problem. I guess I'll submit it to Jira.

-Brian


Top
 Profile  
 
 Post subject: issue already in Jira
PostPosted: Sun Nov 20, 2005 3:45 pm 
Newbie

Joined: Tue Sep 28, 2004 2:03 pm
Posts: 9
Location: Fullerton, CA
http://opensource2.atlassian.com/projec ... se/HBX-267


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