Django

Code

Ticket #4155 (closed: duplicate)

Opened 1 year ago

Last modified 1 year ago

[enhancement] Allow Subclassing Models in ORM

Reported by: David Cramer <dcramer@gmail.com> Assigned to: adrian
Milestone: Component: Database wrapper
Version: 0.96 Keywords:
Cc: Triage Stage: Unreviewed
Has patch: 0 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

The ORM is following subclassed models to their base classes.

http://dpaste.com/hold/9045/

In theory, this would create the new table (based on all of the old models structure) with syncdb, which it does. You would then be able to access this new model just like the old one, but the data would be in the new table.

However, it is not doing so, it is accessing data from the "Spell" table in this example, when calling any of the ORM functions for TmpSpell?

Attachments

Change History

04/25/07 13:14:38 changed by ubernostrum

  • status changed from new to closed.
  • needs_better_patch changed.
  • resolution set to invalid.
  • needs_tests changed.
  • needs_docs changed.

Model subclassing is not currently supported in Django; no guarantees are made that subclassing will or will not work.

04/25/07 13:28:15 changed by David Cramer <dcramer@gmail.com>

  • status changed from closed to reopened.
  • resolution deleted.
  • summary changed from Subclassing Models ORM issues to [enhancement] Allow Subclassing Models in ORM.

04/25/07 13:30:45 changed by David Cramer <dcramer@gmail.com>

  • status changed from reopened to closed.
  • resolution set to duplicate.

See #1656


Add/Change #4155 ([enhancement] Allow Subclassing Models in ORM)




Change Properties
Action