• sugar_in_your_tea
    link
    fedilink
    arrow-up
    3
    ·
    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.