SRA Lab Open Source Code

14Jan/090

Limitations of the Django ORM (1.0) in model inheritance

Vertimus has been merged with Damned-Lies and it's wonderful to see how a tiny project is able to receive as much coverage and talks (in geek circles only of course, GNOME Commit Digest 13, planet, GNOME i18n list). I've been spending more time that I've estimated because of Django ORM limitations.

Django is a nice framework with a really good documentation, what I miss the most is a powerful ORM as SQLAlchemy. To code the Design Pattern State in Vertimus, I used two classes StateDb and StateAbstract instead of one to avoid to have too many SQL tables and other drawbacks (same design for actions: ActionDb and ActionAbstract). I've tested many designs before to find the right one which fit my needs. The Django developers are aware of these current limitations and I found a useful document to understand the current Django ORM limitations in model inheritance:

http://www.slideshare.net/LorenDavie/model-inheritance/

I've read this document a bit late I hope you'll find it on time.

Tagged as: Leave a comment