Comment

Comment by imtringued

Insert queries are tedious. Especially if you are using named parameters.

    Foo.withSession { session ->
        session.createSQLQuery("INSERT INTO FOO (bar, baz) VALUES (:bar, :baz)")
               .setParameter("bar", "bar")
               .setParameter("baz", "baz")
               .executeUpdate()
    }
vs

    new Foo(bar: "bar", baz:"baz").save()
I don't need more justification to use an ORM.
parent imtringued 7 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton