Saturday, February 28, 2015

Pitfall during first Steps with Grails

Yesterday we started a coding night at our company with the goal to checkout the benefits of seperated programming of backend and frontend code. We were free in choosing technologies so i decided to use Grails for the backend and Angular.js as the frontend technology. The first tries saving an entity failed and i did not explain it to myself why that was happening. A simple Adress Entity with some fields (name, street etc. ) but saving did nothing. The solution came to me after i enabled the SQL Debug Logging in Grails (open DataSource.groovy and add logSql=true to the dataSource Definition). The logging revealed that all fields were non nullable so inserting failed without an error message. Not really nice by Grails :-)

About the result of my experiments i will inform you later, so check my block.