On Sun, Aug 23, 2009 at 9:18 AM, Andrea Zilio<m.ep...@gmail.com> wrote:
>
> Hi all,
>
> Here's what I'm talking about:
> You have 3 models: Place, Restaurant and Cinema where Restaurant and
> Cinema both inherits from Place.
> So in the database you have some simple places, some places which
> really are Cinemas and some places which really are Restaurants.
>
> Well, I think that this should be possible:
>>>> Place.objects.all()
> [<Place>, <Cinema>, <Restaurant>, <Place>]
> (Current implementation only returns Places objects)
...
> Maybe this has been previously discussed but I couldn't find any
> ticket or any discussion about it.
> So take this as a proposal if it wasn't already discussed or as a
> request to have some info about the previous discussion.

This has been discussed, at length, and rejected. If you search the
django-dev archives, the discussion happened around the time that
model inheritance was being added to the ORM. For the most part,
you're looking for a series of discussions between myself and Malcolm.
Using "CORBA" as a keyword in your search will help (and if you know
anything about CORBA, will also explain why the idea was ultimately
rejected).

The techniques to achieve this sort of thing are well known and well
established, but they do come at a cost. We opted not to wear that
cost by default in inherited models. If you want this capability, it
(or something functionally equivalent) can be added as an end-user
add-on to models.

Yours,
Russ Magee %-)

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

Reply via email to