It's not a secret anymore!
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
JavaRanch » Java Forums » Languages » Groovy
Bookmark "Oracle DB" Watch "Oracle DB" New topic

Oracle DB

kim paul

Joined: Oct 24, 2009
Posts: 1

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
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.


Author of Grails: A Quick-Start Guide
I agree. Here's the link:
subject: Oracle DB
It's not a secret anymore!