Hi ,
Can anybody help me out how to do the OR Mapping for the following with Hibernate.
Table Users:
Users(int user_id, varchar username)
user_id is primary key and auto increment column.
Table Addresses:
Addresses(int address_id, int user_id, varchar city, varchar state,...)
address_id is primary key and auto increment column.
Code:
public class User
{
int userId;
String username;
Address address;
// setters n getters
}
public class Address
{
int addressId;
int userId;
String city;
// setters n getters
}
|