Beginner |
|
Joined: Thu Aug 19, 2004 2:33 pm Posts: 30 Location: CA, USA
|
See the reference doc. It has examples.
You can use one mapping for each table or put them into the same .hbm.xml file. It's up to you. I usually keep them separate. It makes it easier to find them if they are named after the table they describe and they only contain one table.
You don't use the "property" tag to define the relationship between the tables. You use the "many-to-one", "one-to-many", "set", etc tags based on the type of relationship. These will correspond to a java bean style getter on your java bean. For example, a "one-to-many" replationship will correspond to a method like this:
public List getTariffs() {...}
|
|