What Micro ORM are equivalent from Java?

dapper java massive petapoco subsonic

Question

What Java construct would be the most similar to a Micro ORM like Dapper, PetaPoco, Massive, or CodingHorror?

1
56
6/11/2012 3:24:03 PM

Accepted Answer

I advise JDBC Spring templates. Even though it isn't a "real" ORM, it is enjoyable to use in situations when Hibernate feels excessive.

22
6/27/2011 10:49:25 PM

Popular Answer

A lightweight JDBC wrapper, sql2o seems to be a Dapper substitute.

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);

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

- http://www.sql2o.org/



Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow