Opened 10 years ago

Closed 10 years ago

#4155 closed (duplicate)

[enhancement] Allow Subclassing Models in ORM

Reported by: David Cramer <dcramer@…> Owned by: Adrian Holovaty
Component: Database layer (models, ORM) Version: 0.96
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

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

Change History (3)

comment:1 Changed 10 years ago by James Bennett

Resolution: invalid
Status: newclosed

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

comment:2 Changed 10 years ago by David Cramer <dcramer@…>

Resolution: invalid
Status: closedreopened
Summary: Subclassing Models ORM issues[enhancement] Allow Subclassing Models in ORM

comment:3 Changed 10 years ago by David Cramer <dcramer@…>

Resolution: duplicate
Status: reopenedclosed

See #1656

Note: See TracTickets for help on using tickets.
Back to Top