Thanks for everyone's comments.

>From: Rafael Alvarez [mailto:[EMAIL PROTECTED]]
>
>You can do two things:
>.- In the EJBCreate change the user name to Upper or Lower case  when
>setting it. Also in the PK class change it to Upper or Lower case.

Not a good solution for me, because I want to preserve case.  I don't
want to maintain a second field with the correct case; I might as well
use an integer key.

>.- Override the PK class equal() method, to compare the username in
>Upper(Lower)case.

How does this work?  Doesn't the database need to be made aware of the
insensitivity?  How would finders work?

I'm confused about how an app server handles this.  Any information
would be very helpful :-)

Thanks,
Jeff


>Thursday, March 08, 2001, 7:30:39 PM, you wrote:
>
>JS> I have a primary key which is a string (user's name), and 
>I would like
>JS> it to be case-insensitive.  That is, if there is already a 
>"bob" entity,
>JS> trying to create a "Bob" entity should throw a 
>DuplicateKeyException.
>JS> Is there a way I can do this with Orion?
> 
>JS> I vaguely recall reading something in the documentation 
>about this, but
>JS> now I can't seem to find it.  I'm starting to think that I 
>imagined it.
> 
>JS> Thanks,
>JS> Jeff
>
>-- 
>Best regards,
> Rafael                            mailto:[EMAIL PROTECTED]
>
>
>
>

Reply via email to