Java Micro ORM equivalent

dapper java massive petapoco subsonic

Question

What would be the closest equivalent in Java to a Micro ORM such as Dapper, PetaPoco, Massive or CodingHorror?

Accepted Answer

I recommend Spring JDBC templates. While it's not a "true" ORM, it's a pleasure to use where Hibernate seems to be an overkill.


Popular Answer

sql2o seems like a Dapper alternative - thin wrapper around JDBC

String sql =
    "SELECT id, category, duedate " +
    "FROM tasks " +
    "WHERE category = :category";
Sql2o sql2o = new Sql2o(DB_URL, USER, PASS);
List<Task> tasks = sql2o.createQuery(sql)
    .addParameter("category", "foo")
    .executeAndFetch(Task.class);

github - https://github.com/aaberg/sql2o

site - http://www.sql2o.org/




Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Is this KB legal? Yes, learn why
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Is this KB legal? Yes, learn why