I am new to hibernate,
i have 2 tables. customer and customer_residence
Customer =======
customerID [pk] customerName
customer_residence ===============
customer_residenceID [pk] customerID [fk] customerAddress
in this, 1 Customer could have many customer_residence. for example a person named X may have residence in US,UK, etc.
could some one please show me how to write the HBM.XML classes for these, and also a main method to test this program. (in the main method , the customerAddress should be an ARRAYLIST)
please note, that this is not my homework that i'm making u to do, i am trying to understand how to code this, so i could use this concept to code my real application.
|