I'm trying to do a basic webmail by accessing directly to the inboxes
(stored in a database).
As I want to map the messages with hibernate, I need to determine the
primary key.
I see that the inboxes table has a message_name field ( character
varying(200) ).
And from James code, I have in MailImpl : this.name = message.toString
();
But also : "inboxes_pkey" primary key, btree (repository_name,
message_name)
To make things more simple, I'd like to use only one column for my
primary key ( message_name ), but it's not obvious to me if this is ok.
Do I also need to include the repository name or can I just use
something like this :
/**
* @hibernate.id
* generator-class="assigned"
* column="message_name"
*/
public String getId() {
return message_name;
}
Thanks,
Sylvain.