----- Original Message -----
From: Rickard �berg <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, August 12, 1999 10:30 PM
Subject: Re: CMP, ContainerManagedFields, and Primary Key
Hey
Murali Krishna Devarakonda wrote:
> The User bean's UserPK primary key class contains:
> String login
> String password
Does this mean that in your system it is not allowed to change password?
Because this is the consequence of the above.
<MKD>
What's stopping me from having a "changePassword( String password )" method?
</MKD>
I would use only "login" as primary key. If you're doing the above just
for validation ("findByPrimaryKey" returns NotFound on invalid
login/password combo) I would consider that a hack that will backfire
some day (when user wants to change password). Do it some other way.
<MKD>
You are right. That's the idea- to validate password, and also to get a
single User reference, instead of an Enumeration of 1 User that a
findByLoginAndPassword(String login, String password) would return.
Assuming I can change password with a "changePassword( String password )"
method, what other problems do you see here? When we move to a more
sophisticated password authentication mechanism, I can always remove
"password" from my UserPK.
Thanks for your input.
Murali
</MKD>
/Rickard
--
Rickard �berg
@home: +46 13 177937
Email: [EMAIL PROTECTED]
Homepage: http://www-und.ida.liu.se/~ricob684
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".