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
|