Joined: Fri Sep 09, 2005 11:11 am Posts: 19
|
public class Order
{
private String orderId;
private String detail;
private Item item;
}
public class Item
{
private String itemId;
private String itemName;
}
===============
Each class maps to a different database table.
session.save(order) would saves orderId and detail into the order table but information in item property would be saved into item table.
order = session.load(Order.class, "123"); would load orderId amd detail from order table but it loads property item from the item table.
Would anyone show me how to write the mapping file?
Thanks.
|
|