Hi Laurie,

On Sat, 2007-03-10 at 17:45 -0500, Laurie Harper wrote:
[...]
> I want Project needs to be a sub-type of Page (hence inheriting from
> Page rather than just models.Model). Page.objects.all() should return
> both Page and Project instances; inserting a Project should create a
> row in the Page table; etc. 
> 
> Given the restriction of the existing DB schema, is there anything I
> can do? Is this supported by Django ORM? I know the OneToOneField
> field type is 'deprecated' / subject to change, so ideally I'd like to
> use a solution that doesn't require it, but I can live with it if I
> need to (and potentially re-write some code later). 

We don't have model inheritance yet. However, all the design work (and a
fair portion of the coding has been done) and it will work exactly as
you want: one table per sub-class, by default. Doesn't help you now, I
realise, but it's in the future. It will be in before 1.0 (but after
0.96).

In the meantime, don't worry about the documentation note on
OneToOneField (we really need to change that). There are no plans to
remove it or change its behaviour in any significant way, since it's
actually a useful field. It may undergo some "under the covers" changes,
because it's implemented a bit differently from other relations at the
moment, but I can't see the public API changing.

Regards,
Malcolm


> 
> Thanks,
> 
> L.
> 
> 
> > 


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

Reply via email to