I once had to rewrite the fetch queries in Django's ORM to prefetch all its 'child tables' (read tables with a foreign key or a many to many relation to the table in question). While the syntax is not difficult it felt like hardcoding which renders the ORM not really capable to do it properly. I get that one does not always need to prefetch, but a more abstract way such as passing a class would have been a lot better. This latter is still a form of hardcoding, yet makes the code more readable.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I once had to rewrite the fetch queries in Django's ORM to prefetch all its 'child tables' (read tables with a foreign key or a many to many relation to the table in question). While the syntax is not difficult it felt like hardcoding which renders the ORM not really capable to do it properly. I get that one does not always need to prefetch, but a more abstract way such as passing a class would have been a lot better. This latter is still a form of hardcoding, yet makes the code more readable.