Just a comment to Tim from a strictly database perspective: what I do in your
situation is use a generated key (normally from a sequence or an autonumbering
column) to be the primary key. Then it WILL be immutable. A separate unique
constraint can be applied to the email account name. I can't remember a good
case for a changeable primary key that is different from simply removing the
old record and inserting the new.
Robert
[EMAIL PROTECTED] on 02/03/2000 02:48:18 PM
Please respond to [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
cc:
Subject: Thanks and Problem report
Wanted to thank everyone for their help on the past couple
problems I've had.
I think the container managed bean problem could be the
transaction not supported (using MySQL which I know is not a
great thing, and I need to use TX_NOT_SUPPORTED to get it to
work), or maybe the changing of the primary key class.
I've reviewed the EJB specification fairly completely, and can find
nowhere that says that the primary key cannot change. It is not an
immutable object in my case, but it will always uniquely identify a
bean, which I think is the requirement.
My case is a mail account on a server, where the primary key is
the mail account mame ([EMAIL PROTECTED]) for example.. a
combination of username and domain. There are rare cases when
an administrator will want to change the username of the person (or
a domain if they sign up for a virtual hosting) while still retaining all
other information associated with the account. The mail address
must always be unique, of course, so it makes a good primary key.
----
To unsubscribe, send email to [EMAIL PROTECTED] and
include in the body of the message "unsubscribe jonas-users".
For general help, send email to [EMAIL PROTECTED] and
include in the body of the message "help".