GNA - JORM Java Object Relational Mapper is another OR-Mapper for Java Pojos (Plain Old Java Objects).
Why another OR-Mapper ?
It is different to other OR-Mappers, because it is:
| fast | it is very fast (without using caches), because it's simple (see PolePosition benchmark ). |
| save | it don't uses any caches, if you commit, everything is written to the database, immediately ! it is designed for multy-threaded environments ( it is thread-save ). it can handle recursive linked object-graphs correctly. |
| lightweight | the main functionality is kept in 15 Java-Classes ( the whole jar is about 100k ). at runtime no additional jars are needed (ok, you need a jdbc-driver). |
| simple to use | there is no mapping description needed. it handles whole object-graphs. You only have to attach/detach the root-object to the session. it supports transactions so you can commit() or rollback() whole units of work. |
| easy to understand | every class (even a derivate) is mapped to one table in the database, you see your objects.
as rows and your attributes as columns. Inheritance is not spread over many tables. |
| economically | it supports lazy loading , by using Hollowobjects (you work with your classes, no proxys !)
it has build in session pooling. it is free under license GPL . |
| flexible | you can provide a dedicated mapping description (a single mapping.xml).
it supports linked objects via Java-Interfaces transparently. use embeded Objects to melt smaler objects into the parent-tables. |
| convenient | OO-Path-Querys like getObjects( new Query(Address.class, "country->currency->isoCode", Query.LIKE, "EUR") . the schema-checker tool will help you keep your database compatible to your classes . |