Fixed #17673 -- Forbid field shadowing.

Thanks Anssi Kääriäinen for the suggestion.
This commit is contained in:
Christopher Medrela 2014-02-07 22:34:56 +01:00 committed by Tim Graham
parent f5123c7291
commit ee9fcb1672
6 changed files with 223 additions and 65 deletions

View file

@ -1068,6 +1068,12 @@ Miscellaneous
which does allow primary keys with value 0. It only forbids *autoincrement*
primary keys with value 0.
* Shadowing model fields defined in a parent model has been forbidden as this
creates amiguity in the expected model behavior. In addition, any clashing
fields in the model inheritance hierarchy results in a system check error.
For example, if you use multi-inheritance, you need to define custom primary
key fields on parent models, otherwise the default ``id`` fields will clash.
.. _deprecated-features-1.7:
Features deprecated in 1.7