The OneToOne relationship seems to be more of an inheritance type of
relationship, hence that cannot be used.

On Sep 16, 10:28 am, Craig McClanahan <craig...@gmail.com> wrote:
> On Wed, Sep 16, 2009 at 7:15 AM, PlanetUnknown
>
> <nikhil.kodil...@gmail.com> wrote:
>
> > For example - User HAS "Contacts"; User HAS "Preferences"
> > Usually (I'm from an Oracle/Java background) the Contacts table would
> > have a "user-id" foreign key.
> > However Django models refer Foreign Key relations as "Many-to-one",
> > but that is not true in my case.
> > There is only one Contact table for a User and it might keep growing
> > as new fields are added.
> > Don't want to clutter up the User Profile with all this.
>
> > Thanks for any ideas you can share.
>
> Sounds like you might want a models.OneToOneField() instead of a
> models.ForeignKey field.
>
>  http://www.djangoproject.com/documentation/models/one_to_one/
>
> Craig
>
>
>
>
--~--~---------~--~----~------------~-------~--~----~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to