Grails 0.3 – additional Hibernate mapping and Entity simplifications added

Grails 0.3 has been released and it now includes support for Hibernate’s n:m mapping support (although in reality this is nearly always better if mapped as n:1 and 1:m with an association table in the middle – this was possible in previous versions of Grails anyway), plus additional simplification for developing your Entities.

Normally you would generate a new Entity using ‘grails generate-domain-class’ which would put in the necessary ‘equals()’, ‘hashcode()’ and ‘toString()’ methods, but these are no longer needed (unless you need to override them) as they are generated for you at runtime. This leads to very concise Entity classes.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.