My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
Grails  
Using dbmapper from Grails
Featured, Phase-Deploy
Updated Feb 4, 2010 by spull...@gmail.com

Introduction

If you follow the GORM rules for tables in your database, this should work great.

Install the plugin

grails install-plugin dbmapper

Generate the classes

grails generate-domain-classes

This will create JPA domain classes in your grails-app/domain directory along with a hibernate.cfg.xml file within grails-app/conf/hibernate.

Modify your DataSource

You need to modify your main DataSource definition to support annotated Hibernate classes:

configClass = GrailsAnnotationConfiguration.class

Comment by simon...@gmail.com, Nov 23, 2007

Doesn't support clob/blob yet?

Comment by b.collo...@gmail.com, Oct 11, 2010

Please, where can we find a boil down of the GORM rules ? Or another document referring to the rules for the mapping from an existing database using Grails ?

Thanks in advance.

Comment by onaleki...@gmail.com, Mar 11, 2011

please help, this seems not to be working for me.

Comment by joerg.r...@gmail.com, Aug 17, 2011

In STS using Grails 1.3.7 I get the following error when running "grails generate-domain-classes":

Running script /Users/d054048/.grails/1.3.7/projects/GoverNestor?/plugins/dbmapper-0.1.7/scripts/GenerateDomainClasses?.groovy Error executing script GenerateDomainClasses?: null/scripts/Compile.groovy (No such file or directory) java.io.FileNotFoundException?: null/scripts/Compile.groovy (No such file or directory)

at java.io.FileInputStream?.open(Native Method) at java.io.FileInputStream?.<init>(FileInputStream?.java:120) at gant.Gant$closure1.doCall(Gant.groovy:128) at gant.Gant$closure1.call(Gant.groovy) at GenerateDomainClasses?.run(GenerateDomainClasses?:32) at GenerateDomainClasses?$run.call(Unknown Source) at gant.Gant.prepareTargets(Gant.groovy:606)
Error executing script GenerateDomainClasses?: null/scripts/Compile.groovy (No such file or directory)


Sign in to add a comment
Powered by Google Project Hosting