On Tue, Dec 21, 2010 at 8:33 PM, Torsten Bronger
<bron...@physik.rwth-aachen.de> wrote:
> Hallöchen!
>
> Marc Aymerich writes:
>
>> [...]
>>
>> Morgan, take a look at the inheritanceManager of this app:
>> https://github.com/carljm/django-model-utils#readme
>
> Is anything like this planned for core Django?  It's the third or
> forth time I see someone needing it.

It's not planned for 1.3. Whether it is planned for 1.4 will depend
entirely on whether someone drives the issue.

For the record, the use case you describe was considered at the time
model inheritance was introduced. If you search the archives for
"CORBA narrowing" you should be able to find the thread where Malcolm
and I discussed it.

At the time, we decided to omit support for 'narrowing' (to use the
CORBA parlance) as part of the default feature set because it requires
either:
 a) table overhead to store the type of the child instance
 b) an expensive query (or list of queries) that isn't obviously expensive.

We weren't (and I'm still not) willing to impose either of these
overheads by default.

The good news is that either strategy is easy to implement without
modifications to core. I've got several classes in production that do
narrowing-like behavior (for the record, both using strategy (a)).
With a bit of extra effort, this should be easy to turn into a mixin
that could be shared as part of a third-party support library, much as
django-treebeard or django-mptt provide model support extensions
implementing tree-like structures.

Yours,
Russ Magee %-)

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to