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

-- 


Echte DSL-Flatrate dauerhaft für 0,- Euro*. Nur noch kurze Zeit!
"Feel free" mit GMX DSL: http://www.gmx.net/de/go/dsl

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