*
The moose likes Groovy and the fly likes Oracle DB Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Languages » Groovy
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Oracle DB
 
Similar Threads
Servlets in multiple JVMs sharing one App log file?
JDBC in Applets, problems
Unable to load the database table values into jsf table component
how to extract database metadata
one to one mapping between two tables using hibernate