News for hackers. Stuff that matters.
Re:What ORMs Have Taught Me: Just Learn SQL (2014) by Cthulhu_ on Wednesday October 21, 2020 @10:00AM (#24847946)
I'm trying Gorm right now, and I'm running into some serious issues where it's not as straightforward as an ORM should be (mostly having to do with transparently saving / updating relationships).

I'm reluctant to go to straight SQL because then I have to:

- Write a ton of 'mapping' code between resultsets and data model

- Do a lot of diffing to determine which relations to add, update or remove

- Manage my own database migrations - challenging because I'm stuck with using sqlite

- etc

I want my tools to make things easier for me, but gorm seems to be the "now you have two problems" direction - for now. Maybe I just don't get it yet. Maybe I just don't get databases anymore either.

Re:What ORMs Have Taught Me: Just Learn SQL (2014) by vptr on Wednesday October 21, 2020 @12:29PM (#24849386)
Depending on which DB you're using, I'd suggest trying out https://sqlc.dev instead of gorm if on PG. Mysql support is a bit flaky last time I checked.