Skip to main content

Preferred tool for object-relational mapping

33% (316 votes)
41% (396 votes)
2% (20 votes)
Apache OJB
4% (38 votes)
Roll your own
7% (71 votes)
3% (28 votes)
Don't use
10% (94 votes)
Total votes: 963


Request to Castor voters

In what kind of applications are you using them ..... anybody has tried in multi thread scenarios..... would love to hear from them

Entity Beans

I find rather amusing that Entity Beans are not on this list ;)

Rolling your own is much simpler

If you're rolling your own there are only four things you need to worry about: Insert Update Select Delete I can pick up the SQL and slap it into a prototyping tool (like Access) to check that it works. Or even (shock horror) get Access to write the query for me (these columns, from these tables, with this sort of join... ta da!) and then cut and paste the SQL from Access into the code. If the schema changes, unit tests will catch it, and the fixes are quick. But if I'm using a tool, I need to learn all the ins and outs, how to configure it, fiddle around with arcane and obscure XML etc. The tools take a moderately easy task, and turn it into a particularly difficult task....

Rolling your own is much simpler

Until you need to scale the system up with pooling & clustering, or add a few tens of tables to it, or just port to another DB vendor in next to no time. Then it turns out that rolling your own took a moderately easy task and turned it into a particularly difficult task.


Very surprised not to see IBATIS on the list. SQL Maps are extraordinarly useful especially when you need to interactive with an already existing database schema that may not lend itself well to object queries. Not that they aren't good for newly developed schemas as well. The Spring Framework offers excellent support for IBATIS which makes developing DAOs from SQL maps very clean and simple.


Yes, iBatis is good , I like use it.