Sometimes you want to select associated objects using a single select query. Also called eager fetching.
Todo this with HQL in Grails is a simple as:
List<Sensor> sensors = Sensor.findAll("FROM Sensor s INNER JOIN FETCH s.equipmentType")
Sometimes you want to select associated objects using a single select query. Also called eager fetching.
Todo this with HQL in Grails is a simple as:
List<Sensor> sensors = Sensor.findAll("FROM Sensor s INNER JOIN FETCH s.equipmentType")