Tuesday, April 19, 2011

Re: Unidirectional relations

I think you would need an intermediate table 1:n with the parent containing the child ids. Otherwise the children need a foreign key reference to the parent.

On 20/04/2011, at 10:06 AM, Juan Pablo Romero Méndez <jpablo.romero@gmail.com> wrote:

> Hello,
>
> Is it possible to create unidirectional relations within django's orm?
>
> What I mean is a situation where a parent has a children_set of
> references to children, but the children don't have any reference to
> the father.
>
>
> Regards,
>
> Juan Pablo
>
> --
> 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 django-users+unsubscribe@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
>

--
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 django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate