#7623: Multi-table inheritance does not allow linking new instance of child model to existing parent model instance. -------------------------------------+------------------------------------- Reporter: brooks.travis@… | Owner: nobody Type: Bug | Status: reopened Component: Database layer | Version: master (models, ORM) | Resolution: Severity: Normal | Triage Stage: Design Keywords: model-inheritance, | decision needed multi-table-inheritance | Needs documentation: 1 Has patch: 1 | Patch needs improvement: 1 Needs tests: 1 | UI/UX: 0 Easy pickings: 0 | -------------------------------------+-------------------------------------
Comment (by sammiestoel@…): There is an even easier work around not 100% sure if it works as expected yet though: {{{ child = Restaurant(place_ptr_id=place.pk) child.__dict__.update(place.__dict__) child.save() }}} Tested it myself for my use case as working. Thanks to: http://stackoverflow.com/questions/4064808/django-model- inheritance-create-sub-instance-of-existing-instance-downcast -- Ticket URL: <https://code.djangoproject.com/ticket/7623#comment:21> Django <https://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 django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.