• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Oracle DB

 
kim paul
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic