Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question on GORM

 
Joe Harry
Ranch Hand
Posts: 10124
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guys,

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?
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

User.findByUsername()
User.findByFirstNameAndLastName()
User.findByPasswordAndLastName()

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.
 
Joe Harry
Ranch Hand
Posts: 10124
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply. That sounds more interesting. Might be I'd explore on it more.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic