News for hackers. Stuff that matters.
Re:Django 5.0 Is Released by pmontra on Monday December 04, 2023 @04:34PM (#38523447)
The ORM is OK as long as you refrain from using any inheritance. If you do, the database becomes a mess quickly and only that very Django app will be able to read and write to it (including manage.py shell). Anything else, other apps in any language or a SQL client, will be lost in a sea of tables and joins.

I've got a customer with two Django apps. One was developed enthusiastically in the object orientation way. The database is a nightmare. The other one was developed thinking table by table and creating models that mimic the tables we want to have. That's a database we can also deal with from other apps and tools.

Re:Django 5.0 Is Released by dd82 on Monday December 04, 2023 @04:47PM (#38523599)
tbh, any OOP paradigms used with db tables will end up in a clusterf*ck.
Re:Django 5.0 Is Released by NoGravitas on Tuesday December 05, 2023 @10:25AM (#38532045)
I've found inheritance to be a problem with pretty much any ORM I've used extensively (Django, Hibernate, NHibernate, Entity Framework). It helps to design your OOP model with that in mind; having no more than one level of inheritance, and using inheritance only to supplement a set of common records seem to be good enough rules of thumb.