Hi,

I'm just learning Django, so I apologize in advance for what may be a
remedial question, but here goes:

I created two models.  In the first, I defined the Primary Key to be a
60 character CharField into which I'm putting a UUID (uuid.uuid4(), to
be specific).

In the second model, I created a OneToOneField that linked back to the
first model.

When Django auto generated the sql for the second table, the primary/
foreign key column it created was of type Integer.  That's a type
mismatch with the primary key field in the first table.

I overcame this by editing the SQL before running it, but syncdb
doesn't work, and it's an added step I have to remember to do
(unsafe).

Is there a way to tell OneToOneField that it should be creating a 60ch
CharField instead of an Integer field?

Thanks,
-Ben


--~--~---------~--~----~------------~-------~--~----~
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