| ▲ | zanellato19 6 hours ago | |
Every single time. Where are these developers? Orms are a god send 98% of the time. Sure, write some SQL from time to time, but the majority of the time just use the ORM. | ||
| ▲ | saxenaabhi 6 hours ago | parent | next [-] | |
We have a POS system where entire blogic is postgres functions. There are many others as well. Sure Rails/Laravel/Django people use the ORM supplied by their framework, but many of us feel it's un-necessary and limiting. Limiting because for example many of them don't support cte queries(rails only added it a couple of years ago). Plus it get weird when sometimes you have to use sql.raw because your ORM can't express what you want. Also transactions are way faster when done in a SQL function than in code. I have also seen people do silly things like call startTransaction in code and the do a network request resulting in table lock for the duration of that call. Some people complain that writing postgres functions make testing harder, but with pglite it's a non issue. As an aside I have seen people in finance/healthcare rely on authorization provided by their db, and just give access to only particular tables/functions to a sql role owned by a specific team. | ||
| ▲ | tete 5 hours ago | parent | prev | next [-] | |
> Orms are a god send 98% of the time. People who write percentages make shit up 98% of the time. Or in other words: Source? | ||
| ▲ | d4v3 4 hours ago | parent | prev | next [-] | |
> Sure, write some SQL from time to time, but the majority of the time just use the ORM So add another layer that has to be maintained/debugged when you don't have to? | ||
| ▲ | morkalork 6 hours ago | parent | prev [-] | |
I worked at a company where we used Dapper with plain SQL. Like the sibling commenter said, simplicity. There were never [ORM] issues to debug and queries could easily be inspected. | ||