I'm trying to get a xdoclet to generate my mapping file.
I have a trivial class:
Code:
package org.petsoar.pets;
/**
* @hibernate.class table="PETS"
*/
public class Pet
{
private Long id;
private String petName;
/*
* @hibernate.property column="pet_name" type="string" unique="true"
* @return
*/
public String getPetName()
{
return petName;
}
public void setPetName(String string)
{
petName = string;
}
public void setId(Long l)
{
id = l;
}
/**
* @hibernate.id generator-class="native" column="PET_ID"
*/
public Long getId()
{
return id;
}
}
The generated mapping file looks as follows:
Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping>
<class
name="org.petsoar.pets.Pet"
table="PETS"
dynamic-update="false"
dynamic-insert="false"
>
<id
name="id"
column="PET_ID"
type="java.lang.Long"
>
<generator class="native">
</generator>
</id>
<!--
To add non XDoclet property mappings, create a file named
hibernate-properties-Pet.xml
containing the additional properties and place it in your merge dir.
-->
</class>
</hibernate-mapping>
For whatever reason, xdoclet is not picking up my hibernate.property tag.
Is there anything obvious I'm doing wrong? I'm using the latest version of xdoclet and of hibernate.
Thanks in advance.