In your example SpecialProcess inherits from Process and Sample has a M2M to
Process, where should the SpecialProcess come in?
Is this what you mean:
   class Sample(models.Model):
       processes = models.ManyToManyField(SpecialProcess)

If you do this, you should get SpecialProcess from

 print process.__class__.__name__

otherwise, I do not know how SpecialProcess is supposed to fit in to Sample
at all.
-richard



On 7/1/08, Torsten Bronger <[EMAIL PROTECTED]> wrote:
>
>
> Hallöchen!
>
> I use the current SVN version of Django.
>
> Consider the following models:
>
>    class Process(models.Model):
>        ...
>
>    class SpecialProcess(Process):
>        ...
>
>    class Sample(models.Model):
>        processes = models.ManyToManyField(Process)
>        ...
>
> Then I populate one sample with a lot of SpecialProcesses.  Now,
> when I try to walk through the processes of this sample with
>
>    for process in sample.processes.all():
>        print process.__class__.__name__
>
> I get a lot of "Process" instead of "SpecialProcess".  Apparently,
> the popymorphic many-to-many relationsship is not fully resolved.
> Am I doing something wrong or is it a limitation of Django?
>
> Tschö,
> Torsten.
>
> --
> Torsten Bronger, aquisgrana, europa vetus
>                   Jabber ID: [EMAIL PROTECTED]
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
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