hi Dirk.

you still need to put in the content-type & object-id

regards
Ian.

On 08/08/2006, at 6:40 AM, [EMAIL PROTECTED] wrote:


Hi,

I have the following model defined:

from django.db import models

class MyTest(models.Model):
        obj = models.GenericForeignKey()

if I let print the SQL-Create-Statements for mysql-DB I get this:

BEGIN;
CREATE TABLE `test_mytest` (
    `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY
);
COMMIT;

Aren't there 2 fields missing ? content_type_id and object_id ?

Or do I have to extend the model by:

    content_type = models.ForeignKey(ContentType, db_index=True)
    object_id = models.IntegerField(_('object ID'), db_index=True)

???

Django version from SVN-trunk 3534.

Regards,
Dirk

-- 


--
Ian Holsman
http://peopleintopoker.com/ -- where the poker people go



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

Reply via email to