I have recently started reading up on Grails and would like to use SQL Server security schemas to group tables generated by GORM. However, I cannot seem to find a reference explaining how to perform this task. I am new to Hibernate as well and would like to know if this is possible. Thank you.
Right-click the Security folder, point to New, and select Schema. In the Schema - New dialog box, on the General page, enter a name for the new schema in the Schema name box. In the Schema owner box, enter the name of a database user or role to own the schema.
To change the schema of a table by using SQL Server Management Studio, in Object Explorer, right-click on the table and then click Design. Press F4 to open the Properties window. In the Schema box, select a new schema. ALTER SCHEMA uses a schema level lock.
The dbo schema is the default schema of every database. By default, users created with the CREATE USER Transact-SQL command have dbo as their default schema. The dbo schema is owned by the dbo user account. Users who are assigned the dbo as default schema don't inherit the permissions of the dbo user account.
You can do this when you explicitly specify the mapping in a domain class as described here:
class Book {
static mapping = {
table name:"books", schema:"dbo"
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With