i have 2 tables these are as follows
Code:
User emails
----------------------------------------- ----------------------------------------------------------------
user_id | user_name | email_id | email_content | owner_user
----------------------------------------- ----------------------------------------------------------------
001 | user01 001 | content01 | 002
002 | user02 002 | content02 | 001
003 | user03 003 | content03 | 003
004 | content04 | 003
005 | content05 | 001
PojosCode:
public class User{
private int userId;
private String userName;
private Set<Email> emails;
// seters and geters
}
public class Email{
private int emailId;
private String emailContent;
// seters and geters
}
my Request: i want to write Mapping Files that represents this
Relation using <set> and <on-to-many> tags