• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Schema's in Grails

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

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 = "jdbc:oracle:thin:@localhost:1521:CMDDB1"
String driverClassName = "oracle.jdbc.OracleDriver"
String username = "username"
String password = "password"
}


Regards
PVM
 
mohan pemm
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

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

Regards,
PVM
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic