Monday, April 8, 2013

Re: Django Generic ForeignKey vs Multiple Foreign Key Fields

Hi Martin,

A and B are known, and more can come in the future, so it would seem generic is the way to go, but then I dont want to reference on all tables in django.
But using the FK has problem of introducing alter tables later.

Confused about going with which approach.

What do you suggest?

On Monday, April 8, 2013 3:19:07 PM UTC+5:30, Martin J. Laubach wrote:
  It's simply a question of what you want to model.

  GenericFK means for each instance "I have a relationship with some other (undefined) entity". MultipleFK means "I have relationships with both well-known entities A and B". Totally different things.

  Cheers,

    mjl


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate