Hi,

I have an existing model that I've used for some time, and just
recently I had to break it up into two related models that share a
great deal, but have some difference, so I used inheritance to create
two subclasses.

I notice that syncdb is smart enough to not create an sql table for
the base class (although this raises the question of what to do if I
want a table for it), so this seems to be a supported solution. Still,
I'm having problems using the related_name feature for ForeignKeys.

Base
  |
Derived  --->ForeignKey--->Related

If I add a related_name to this ForeignKey of "derived" I get:

foo.derived: Accessor for field 'related' clashes with related field
'Related.derived'. Add a related_name argument to the definition for
'related'.

All is well if I drop the related_name, but I don't understand the
error.

Thanks,
Mike

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

Reply via email to