On Wed, Jul 16, 2008 at 8:59 AM, Chris <[EMAIL PROTECTED]> wrote:
>
> I've run into a strange situation. I have a MySQL database with a
> table called Feature, with a unique column called text.
>
> Given some text, I want to save a new record if hasn't been entered,
> or retrieve the existing record if it already exists. Oddly enough,
> this code fails if the current text has already been entered with a
> different case (e.g. 'abc' vs 'ABC').
...
> Is this the fault of Django's ORM, or some obscure MySQL setting?

I strongly suspect that the problem here is MySQL - in particular, the
collation on your text field. There are certain default setups for
MySQL which will result in all text fields being case insensitive.
This doesn't just affect unique constraints - it affects case
sensitive matching as well.

Yours,
Russ Magee %-)

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to