Test reports path has changed between Grails 2 and Grails 3. However, this lifehack works whether you are using Grails 2 or Grails 3. If you use the grails console a lot this is a must in your toolbelt. Kudos @mrhaki
Grails autoTimestamp is a great feature. I use it all the time. However, it is tough to test. @JacobAae shows you how to use the object's metaClass to modify dateCreated and test it.
I began to read the Grails Guides. Good news! As promised they are a step by step tutorial with the basics. @graemerocher delivers and you will learn how to configure a REST Application with GORM and Hibernate. But most importantly they are spattered with tips and explanations.
Each domain class defined in the application will be compiled to implement the GormEntity trait.
Or testing tricks:
To effectively test interactions with Hibernate in a unit test it is recommended you use grails.test.hibernate.HibernateSpec. The HibernateSpec super class will wrap each test method in a transaction that is rolled back at the end of the test ensuring cleanup between tests.
Or best practices for configuration:
The above example uses the collection method to nest URIs directly underneath the /products URI (for example /product/search) instead of nesting it below the resource identifier (for example /product/1/search).
If you completed the Building a REST application with GORM and Hibernate 5 guide you will see that this is an almost identical guide. However, this time instead of MySQL and Hibernate, we use MongoDB for the persistence layer. You can change the persistence with minor differences. What an example of Grails maturity!
Moreover, tools to assist you in testing are present for MongoDB too:
To effectively test interactions with MongoDB in a unit test it is recommended you use grails.test.mongodb.MongoSpec combined with Embedded MongoDB.
With tips such as:
Grails will use the value defined by the grails.codegen.defaultPackage value in grails-app/conf/application.yml to decide which package to use.
This tutorial remembered me one of the greatest Software Web applications produced in Spain; the defunct and missed Ducksboard
Are you starving for more React + Grails hunger after last week's issue ? This guide by @ZacharyAKlein will get you up and running in no time.
Are you in London? Do you want to learn Grails fast? @pledbrook stewards a Grails course within the next days. A good Christmas present to yourself.
I am preparing a Christmas special for Friday 23rd of December issue. I am already working on a couple of ideas. However any suggestions are more than welcome.