views:

1072

answers:

5

I'd like to have a ActiveRecord implementation in Java and before crafting my own, I'd like to know if there is an open source implementation of it.

I am aware of other successful java OR maping tools like Hibernate, Castor, etc... and that is not what i want, i want a ActiveRecord like in RoR:

Anyone?

+1  A: 

Hibernate is an ORM framework in Java and based on JPA specifications. JPA (Java Persistent API) internally implements ActiveRecord Pattern at number of places. But overall JPA is based on bit complex pattern called as DataMapper.

You can refer to http://www.theserverside.com/tt/articles/article.tss?l=RailsHibernate for comparison between Rails ActiveRecord and Hibernate

Rutesh Makhijani
I know Hibernate, that is why I stated that it wasn't what I wanted, I want a real ActiveRecord implementation
Paulo Lopes
A: 

You could also consider using ActiveRecord-JDBC running on JRuby: http://wiki.jruby.org/wiki/ActiveRecord-JDBC

I haven't done that myself, but I have had great success in using ActiveRecord's Migrations to manage schema migrations in a Hibernate based application.

joekutner
+1  A: 

After "Googling" for a answer I've found the project arjava. It implements the Active Record pattern kind of similar to the Ruby way.

Paulo Lopes
+1  A: 

I released this ActiveJDBC project: http://code.google.com/p/activejdbc/

This is an implementation of ActiveRecord in Java

Enjoy

Igor

ipolevoy
A: 

Check out ActiveObjects, a more Rails-esque ActiveRecord then the other mappers: https://activeobjects.dev.java.net/

Jailbreak