Domain Object Many-To-One relationship Grails GORM and SQL Relationship

This is following post series from ‘Domain Object Relationships in Grails GORM and SQL Relational Databases‘ where we look at the details how the relationships are build in GORM with how physically structrured in DB while cascading and direction addressed. From Grails Documentation, it appears that the relationship One-To-One is the same as Many-to-One in Grails […]

Read more...

Running Multiple Versions of Grails

There may be times when you have to run multiple versions of Grails in your local development environment. It may be because you supporting multiple Grails applications each running different version, or you would like to test your prime Grails app in different version before shipping to customer, or you just grabbed some Grails application from internet( […]

Read more...

Grails Snippets

This is ongoing post to record different useful codes snippets related to Grails framework 1. Default and Shared Constraints. It turns out you can specify default constraints that can be applied and shared in any Domain Class. For example, by default the ‘nullable’ constraint is set to ‘false’. If you wish change that,then updated conf/Config.groovy […]

Read more...

Grails Environment Aware Framework

One of the awesome features Grails provides is its ability to configure multiple environments to run your application. It comes with three initial environment setups – Development, Test, Production. Besides these environments,  you are able to setup your own custom environment. The advantage of having multiple environments is the ability to execute your application with different settings, different data sources […]

Read more...

Shelving Uncommitted Changes in Mercurial

There may be a time when your realize that the changes you just made (uncommitted changes), need to be on separate branch. That happend to me in my new workplace few days ago. My new workplace use branching extensively to ensure code review process is taking place. Every feature or defect is done on separate branch. After work completed, the […]

Read more...

Domain Object Many-To-Many Relationship in Grails GORM and SQL Relational DB

This is following post series about ‘Domain Object Relationships in Grails GORM and SQL Relational Databases‘ where we look at the details how the relationships build in GORM with how physically structrured in DB while cascading and direction addressed. In this post, i have a sample of Many-To-Many relationship between entities ‘RentalUnit’ and ‘Review’. A […]

Read more...

Grails Database Migration Plugin

Grails Database Migration Plugin is very useful for managing SQL database for your grails application. The most useful aspect of it is that it can generate SQL  scripts from current GORM. In my previous job, we used MyBatis to manage Database, however. With MyBatis we had to create SQL scripts manually and to make it according […]

Read more...

IntelliJ Shortcuts and Configurations

In this space, all of the intelliJ shortcuts and configurations that we find more practical then others are listed Shortcuts 1. CTRL+J – Opens up Live Templates. Used for Spock individual test creation in quick way Source:http://tv.jetbrains.net/videocontent/ffff 2. Optimize Import Statements. It removes unused imports and sorts in alphabetical order. To use: Configurations 1. Enable […]

Read more...