The moose likes Groovy and the fly likes Oracle DB Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Other Languages » Groovy
Reply Bookmark "Oracle DB" Watch "Oracle DB" New topic
Author

Oracle DB

kim paul
Greenhorn

Joined: Oct 24, 2009
Posts: 1
Hello,

i'm just trying out some grails apps that i've found online and wanted to get the tables (those Domain Classes) that are made to work on my Oracle DB server instead of the HSQLDB.

I've got it working on one of the apps (by editting that Datasource.groovy file), but with the other one, it tries to create a table called User. And Oracle doesnt seem to like that. I've tried all sorts of things to try and change the table name but it keeps trying to make that User table.
Any advice?

Dave Klein
author
Ranch Hand

Joined: Aug 29, 2007
Posts: 77
You can tell it what table name to use with a mapping block. Something like this:

class User {
...

static mapping = {
table 'user_table_name'
}

}

However, you may have other problems with a class named "User". It might be better overall to change the class name if you can.

Dave


Author of Grails: A Quick-Start Guide
 
IntelliJ Java IDE
 
subject: Oracle DB
 
Threads others viewed
JDBC in Applets, problems
how to extract database metadata
one to one mapping between two tables using hibernate
Unable to load the database table values into jsf table component
Servlets in multiple JVMs sharing one App log file?
developer file tools

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture