RE Composite fields-/ Multi Primary / Foreign keys

155 views
Skip to first unread message

Aron Podrigal

unread,
Feb 24, 2015, 1:14:19 AM2/24/15
to django-d...@googlegroups.com
Hi, I just came across a project that requires  this functionality of multi primary/foreign keys. So I'm bumping up this thread again. There were a lot of changes in django and the db api hasre-factored  since this topic was discussed. It might be a time for another start on this project. I'm willing to work on this as long it is ok with the core developers. I didn't have much time yet to spend on this. I'm still reading through the other earlier threads on possible implementations.
I will post my proposal for this over the weekend. In the meantime I would like to get some feedback from the community. 

Aron.

Russell Keith-Magee

unread,
Feb 24, 2015, 6:01:32 PM2/24/15
to Django Developers
Hi Aron,

Short version - if you're eager to look into this, we're eager to have composite keys in Django - it's probably one of the last features I can think of that was discussed for the 1.0 release but we bumped so that "we can add it for 1.1". 

(ahem. :-)

Yes, there have been a lot of changes since Michal Petrucha (koniiik) last worked on his patch - most notably, migrations and the Meta refactor have landed. Both of these will have a big impact on any composite key design. However, there have also been a bunch of changes to the internals of ForeignKeys that will aid in the implementation of composite keys; the design of the meta refactor also kept the potential requirements of composite keys in mind.

Michal's github branch is probably still the best place to start - he's done a lot of work on this project, and at the very least should be able to guide you as to what is left to be done. 

Best of luck!

Yours,
Russ Magee %-)

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.
To post to this group, send email to django-d...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/a4a31a7b-4759-4006-a280-34d9ac6b0abe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Asif Saifuddin

unread,
Mar 5, 2015, 8:10:18 AM3/5/15
to django-d...@googlegroups.com

Aron Podrigal

unread,
Mar 6, 2015, 12:03:53 PM3/6/15
to django-d...@googlegroups.com
yeah, turns out I got busy with some other work and did not have time to work on this. Fortunately, Thomas has done a lot of great work yet. I'll just follow up on that thread.
Reply all
Reply to author
Forward
0 new messages