Hi all,
I have this simple class in my
Java app.
My mysql database look in this way: I have only a table, named "person". It have 4 columns: 'id', 'name', 'petid', 'petname'.
So I want to describe in my xml file that the value of Pet.id has to be stored in person.petid and that Pet.name has to be stored in person.petname.
How can I perform this step?
<?xml version="1.0" encoding="UTF-8"?>
<hibernate-mapping>
<class name="packagename.Person" table="person">
<id name="id" column="id" type="java.lang.String" />
<property name="name" column="name" type="java.lang.String" />
<property name="pet" ??? />