#8886: loaddata deserializes BooleanFields wrong for inheriting model
---------------------------------------------+------------------------------
Reporter: [EMAIL PROTECTED] | Owner: nobody
Status: new | Milestone:
Component: Serialization | Version: 1.0
Resolution: | Keywords: loaddata
BooleanField
Stage: Design decision needed | Has_patch: 0
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
---------------------------------------------+------------------------------
Comment (by mtredinnick):
This looks like a bug in model inheritance. There's code in
`django.db.models.base.ModelBase.__new__` that tries to detect duplicate
field names and raises an error for them, although at some point I
apparently suffered some kind of blow to the head an only implemented it
for abstract base classes. I don't think that was intentional. There are
drawbacks to trying to allowed overloading, plus it leads to no end of
errors on the developer end. Database model inheritance isnt' a complete
match with Python model inheritance and it's trivial to just not use
duplicate names one they're reported.
So, don't do that (you can change the model without have to change the
database table by using the `db_column` attribute). It's a bug that that
kind of model is legal in the first place.
--
Ticket URL: <http://code.djangoproject.com/ticket/8886#comment:2>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---