7

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?

Community
  • 1
  • 1
Paulo Lopes
  • 5,845
  • 22
  • 31

7 Answers7

9

I released this ActiveJDBC project: http://javalite.io/activejdbc

This is an implementation of ActiveRecord in Java

ipolevoy
  • 5,432
  • 2
  • 31
  • 46
2

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 this Active Record Pattern paper for comparison between Rails ActiveRecord and Hibernate

Adrian
  • 5,603
  • 8
  • 53
  • 85
Rutesh Makhijani
  • 17,065
  • 2
  • 26
  • 22
2

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
  • 5,845
  • 22
  • 31
1

I discover the scooter framework which is based on AR, with built-in Ajax functions and pure Java and Jsp and code generator, it's wonderful of simplicity and efficacity !!

easydoor95
  • 46
  • 2
0

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

jlbenc
  • 424
  • 4
  • 6
0

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.

codefinger
  • 10,088
  • 7
  • 39
  • 51
0

There is a nice implementation in the play framework using JPA. Maybe it can be used solo...

Ray Hulha
  • 10,701
  • 5
  • 53
  • 53