my dog learned polymorphism
The moose likes Groovy and the fly likes Question on GORM Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Languages » Groovy
Bookmark "Question on GORM" Watch "Question on GORM" New topic

Question on GORM

Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 10031


I'm considering to use Groovy for my project. I came across GORM and was just wondering if it is something just like JPA? Is it?

SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15302

GORM is a groovy layer on top of hibernate (not JPA), to put it simply. Grails uses Hibernate (by default) for it's ORM piece. GORM allows you to use the power of hibernate without a single XML file or annotation and it is really powerful. One of my favorite features is dynamic finders. For example, assume the following class:

The following methods (and the underlying HQL) are automatically available to you.


And any similar combination. There's so much more to GORM than this but you get the idea. GORM is generally used within Grails but I have heard of folks using it outside of Grails. Just hit google for information regarding this. By the way, there is a JPA Plugin for Grails that is basicallly GORM but using JPA (with hibernate as the implementation). I'm not sure I see the benefit but it is there if you want it.

GenRocket - Experts at Building Test Data
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 10031

Thanks for the reply. That sounds more interesting. Might be I'd explore on it more.
I agree. Here's the link:
subject: Question on GORM
It's not a secret anymore!