Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using an existing GORM data model in standalone Java app

I have an existing Grails app and a separate, existing Java app. I would like the Java app to access the same database schema as the Grails app. Is there a way I can rip out the domain classes and GORM dependencies from the Grails app into a library that the Java app can access?

I'd also be happy to hear alternative approaches that would be less work than rewriting my DAO layer in the Java app.

like image 876
bajafresh4life Avatar asked Nov 12 '10 15:11

bajafresh4life


1 Answers

This isn't supported and may or may not work. See http://www.grails.org/GORM+-+StandAlone+Gorm You could always use pure Hibernate from your Java app and create the Hibernate model by reverse engineering your existing Grails database scghema.

like image 189
Jared Avatar answered Sep 23 '22 11:09

Jared