One correction:
One 'child' class (ie. with a OneToOneField) does always keep the
reference to the base class in it's pk column.
A couple of additions:
- the OneToOneField is obviously partially working, as even when the
reference is dnot there, the standard 'id' field name is correctly
replace
I have a models.py with several model classes referencing a 'base'
model class using OneToOne fields. The CREATE statement displayed by
manage.py sqlall is weirdly inconsistent -- sometimes the id columns
of the 'child' model classes contain a REFERENCES clause (ie. to the
'base' class), sometimes
2 matches
Mail list logo