On Wed, Feb 4, 2009 at 11:58 AM, John Hampton <[email protected]> wrote: > Michael Schurter wrote: >> >> On Wed, Feb 4, 2009 at 11:49 AM, Joshua D. Drake <[email protected]> >> wrote: >>> >>> On Wed, 2009-02-04 at 11:33 -0800, Michael Schurter wrote: >>>> >>>> On Wed, Feb 4, 2009 at 10:37 AM, Adam Lowry <[email protected]> >>>> wrote: >>>> 2. Django >>>> >>>> Django for everything... thrilling huh? Traditional setup.py style >>>> deployment. >>>> >>> Has Django fixed its ORM yet? Last I checked it lacked the ability to >>> properly handle primary keys. >> >> While Django's ORM is definitely nothing to brag about compared to >> SqlAlchemy and other more powerful Python ORM's, it definitely handles >> primary keys just fine: >> >> Defining: >> http://docs.djangoproject.com/en/dev/ref/models/fields/#primary-key >> >> Querying by: >> >> >> http://docs.djangoproject.com/en/dev/topics/db/queries/#the-pk-lookup-shortcut > > The way I read this is that Django still doesn't support multi-column > primary keys. I also found a ticket[1] that is still open regarding > supporting multi-column primary keys. I didn't read the ticket thoroughly. > Is it true that the Django ORM still can't do multi-column primary keys? > > Joshua, correct me if I'm wrong, but I think that you were referring to > being able to handle multi-column primary keys in your question, no? > > -John
Ah, that. I was hoping you wouldn't notice that. ;-) You are correct, no composite primary key support yet, but they're working on it: http://code.djangoproject.com/wiki/MultipleColumnPrimaryKeys http://code.djangoproject.com/ticket/373 I use surrogate keys and intermediary tables currently. Not pretty and it will make DBAs cry. YMMV _______________________________________________ Portland mailing list [email protected] http://mail.python.org/mailman/listinfo/portland
