0

I am attempting to create a domain object in Grails. Previously I been using MySQL with single database, so my domain object is always easily defined. User domain maps to user table in the current database.

This new project I am working requires me to use DB2, which when querying it, I must provide leading schema information. example: admin.user, Similar to database.table format. So now it is not so clear on how to create a Grails Domain object for this. Anyone have any reference or know how to solve this issue would be a great help.

Thank you.

Churk
  • 4,556
  • 5
  • 22
  • 37

1 Answers1

2

This should do the trick: http://grails.org/doc/2.0.x/ref/Database%20Mapping/table.html

static mapping = {
    table name: "book_catalog", schema: "dbo", catalog: "CRM"
}
Jarred Olson
  • 3,075
  • 1
  • 19
  • 34