First8 staat voor vakmanschap. Al onze collega’s zijn een groot aanhanger van Open Source en in het bijzonder het Java-platform. Wij zijn gespecialiseerd in het pragmatisch ontwikkelen van bedrijfskritische Java toepassingen waarbij integratie van systemen, hoge eisen aan beveiliging en veel transacties een belangrijke rol spelen. Op deze pagina vind je onze blogs.
GORM is a relational database to object mapper. To work properly it needs to know the primary key for each table. The primary key uniquely (and quickly) identifies a single record from a table. GORM (and Hibernate as the underlaying framework) supports many ways to identify a record in your favorite database. Some legacy databases may use trigger-generated primary … Lees verder Quick GORM tip: trigger based primary key generation
Used versions: GORM 6.1.9 Hibernate 5.1.5 Grails 3.3.10 This week I had to map an object on an existing database table with an existing primary key not named ‘id’ but ‘aniId’. By convention GORM is expecting such an ‘id’ property and if it is absent GORM inserts it for us which is very handy with new tables. But with an … Lees verder GORM map table without primary key
Many milestone builds and release candidates later, the official Grails 3.1 shipped a few days ago!
OCI, the new Grails home, summarizes what’s new in this release:
Grails 3.1 comes with Spring Boot 1.3 and Spring 4.2, enabling you to produce runnable JAR files that embed Tomcat, Jetty or other containers. In addition you can use Spring Cloud with Grails 3.1 to build Cloud Native applications.
Grails 3.1 features new support for expandable application profiles, allowing developers to build application creation templates that target a range of different tasks.
Grails 3.1 features new profiles for building REST applications and Single Page Applications (SPA) using AngularJS. The REST profile features a focused environment that helps developers quickly spin-up REST servers, easily deployable either standalone or to modern Java application servers.
The new AngularJS profile in Grails 3.1 helps developers quickly become productive building Single Page Applications (SPA) using AngularJS. By integrating seamlessly with tools such as Bower and Karma, the AngularJS profile provides everything you need to build, run and deploy AngularJS applications backed by Grails.
Grails 3.1 comes with GORM 5, a ground-up rewrite of the innovative data access framework that comes with Grails. Featuring new support for the graph database Neo4j, as well as enhanced support for MongoDB 3 and Hibernate 5, GORM 5 provides all the tools necessary to integrate modern backend applications with your database.
Upgrading from a Grails 3.0 application or plugin generally requires just an version update to gradle.properties but there might be some manual things to do as described in the Upgrading from Grails 3.0 section.
When working with GORM domain classes and using DetachedCriteria (for example the ‘where’ method on domain classes), you will notice at some point that all joins will be inner joins! If the database setup requires an outer (left) join, then the default GORM api has no way to specify this, so you will need a workaround. This workaround works by … Lees verder Outer joins and domain classes
Today I gave a presentation about Grails Object Relational Mapping (GORM) and HQL for the teams. Everybody is pretty SQL-minded and I wanted to show them what — instead of resorting to native SQL in Grails applications right away — GORM and Hibernate can do for them, not just from getting the same queries as your own hand-crafted SQL but … Lees verder Grails GORM – You Know SQL. You Know Queries. Here’s GORM.