views:

63

answers:

1

We are evaluating ORM solutions for my project that has tight coupling between business layer and datalayer(JDBC). I started doing a PoC with Cayenne. My requirement goes like this a) Already there exists database schema b) Schema is very granular level. I.e. real time java objects are only derived by combining tables. c) At the moment I just want to perform read operation (to be precise filter and sort on a list by inputing criteria)

Till now, the observations I have made with Cayenne are 1) Table and Object are tightly coupled. Modeler is not allowing to create java object without associated table. 2) I could not find easy way to map output of a named query to a java object so that I get list in a way application needs. 3) Also I am not sure Expressions work with named queries.

I would like to know your inputs on best choice for my requirement?

Thank you in advance.

+2  A: 

If I had to choose an ORM tool or a JPA provider, it wouldn't be Cayenne simply because it doesn't seem to be widely used so the community behind it isn't very large and this is a concern. There is thus no need to discuss technical points, things like Cayenne 2.0 is intrusive, you have to implement an interface or to extend a superclass (Cayenne 3.0 has POJO support but is still in beta, after more than 2 years...). No, really, I don't see any good reason to not pick Hibernate, the defacto standard, if you need an ORM tool.

But...

Given your requirements, an ORM might actually not be the best choice, mosty because of b) so I would consider using iBatis (which is not an O/R mapper, it's a data mapper) instead.

Pascal Thivent
Thank you for your response. We will consider your recommendation. The requirement I mentioend was a starting. Going forward we may need full ORM features.
Sudheer