Diggin' the new dynamic finders in Grails 1.1 - No Fluff Just Stuff

Diggin' the new dynamic finders in Grails 1.1

Posted by: Pratik Patel on December 30, 2008

This is sweet. Concise but still expressive:

        // both work, 2nd is new in Grails 1.1
        //def itemList = Item.findAll("from Item item where item.id in (:allIds)", ["allIds": allIds])
        def itemList = Item.findAllByIdInList(allIds)

Check out the new features in Grails 1.1Beta2
If you need an IDE for this beta release, you can try the Intellij IDEA EAP release for 8.1, the IDEA 8.0.1 release does NOT support Grails 1.1Beta2.


Pratik Patel

About Pratik Patel

Pratik Patel is a Java Champion and developer advocate at Azul Systems and has written 3 books on programming (Java, Cloud and OSS). An all around software and hardware nerd with experience in the healthcare, telecom, financial services, and startup sectors. He's also a co-organizer of the Atlanta Java User Group and North Atlanta JavaScript meetup, frequent speaker at tech events, and master builder of nachos.

Why Attend the NFJS Tour?

  • » Cutting-Edge Technologies
  • » Agile Practices
  • » Peer Exchange

Current Topics:

  • Languages on the JVM: Scala, Groovy, Clojure
  • Enterprise Java
  • Core Java, Java 8
  • Agility
  • Testing: Geb, Spock, Easyb
  • REST
  • NoSQL: MongoDB, Cassandra
  • Hadoop
  • Spring 4
  • Cloud
  • Automation Tools: Gradle, Git, Jenkins, Sonar
  • HTML5, CSS3, AngularJS, jQuery, Usability
  • Mobile Apps - iPhone and Android
  • More...
Learn More »