my dog learned polymorphism*
The moose likes Groovy and the fly likes Schema's in Grails Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Languages » Groovy
Bookmark "Schema Watch "Schema New topic

Schema's in Grails

mohan pemm

Joined: Jun 18, 2009
Posts: 2

I have just started learning grails. As per my database design, I had to retrieve data from different databases.
Ex: select a.*, b.* from db1.myTable1 a, db2.myTable2 b.

Where do I specify the schema or daabase settings? Is it in ApplicationDataSource.groovy?

My ApplicationDataSource.groovy file contents are:

class ApplicationDataSource {
static mapping =
table 'db1.myTable'
//String dbCreate = "update" // one of 'create', 'create-drop','update'
String url = "jdbcracle:thin:@localhost:1521:CMDDB1"
String driverClassName = "oracle.jdbc.OracleDriver"
String username = "username"
String password = "password"

mohan pemm

Joined: Jun 18, 2009
Posts: 2

In the above query posted, I would like to know where and how do we specify the database names.

I agree. Here's the link:
subject: Schema's in Grails
Similar Threads
Urgent !! why ? no suitable driver ???
Help Me Demistify this
JDBC driver for MS Access
MySQL - add and remove username from table
Question on GORM