• expr
    link
    fedilink
    arrow-up
    6
    arrow-down
    3
    ·
    7 days ago

    I’m confused. Are you saying all of that is a consequence of not using ORMs? Because if so, that’s absolutely not true. ORMs truly are complete trash.

    • sugar_in_your_tea@sh.itjust.works
      link
      fedilink
      arrow-up
      2
      ·
      6 days ago

      Sounds like you were hurt by an ORM.

      One huge benefit of an ORM is that it does type checking. it makes sure your tables exist, relationships are valid, etc, and it makes easy things easy. If you add a column, it’ll make sure it gets populated, give you decent error messages, etc.

      As long as you use a proper repository pattern setup and isolate DB interactions from the rest of the code, how you construct the queries is completely up to you. I try to use DTOs to communicate w/ the repo layer, so whether an ORM is used or direct SQL queries is largely an implementation detail.