Thursday, December 11, 2014

Re: Multi-table inheritance and primary keys

Hey Torsten,

It looks like you ran into the bug reported as https://code.djangoproject.com/ticket/23956 . See my comment #6 for a workaround.

/Markus

On Thursday, December 11, 2014 11:01:51 AM UTC+1, Torsten Bronger wrote:
Hallöchen!

Is it correct that when using multi-table inheritance, I must not
set an explicit primary key in the derived model class?  Currently,
I get

  ...
  File "/usr/local/lib/python2.7/dist-packages/django/db/backends/utils.py", line 65, in execute
    return self.cursor.execute(sql, params)
django.db.utils.ProgrammingError: column "process_ptr_id" of relation "samples_deposition" already exists

while applying the initial migration and wonder whether that what I
try to achive is possible at all.

("samples" is the app name, "deposition" is the model name of the
derived model.)

Tschö,
Torsten.

--
Torsten Bronger    Jabber ID: torsten...@jabber.rwth-aachen.de
                                  or http://bronger-jmp.appspot.com

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/d6975c8a-7944-4b00-970c-742289f8069e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment