Tag Archive: groovy


def traverse
traverse = { folder  ->
  folder.listFiles().each
  {
    def file = it;
    if (file.isDirectory())
    {
      traverse(file)
    }
    else
    {
      System.out.println(file);
    }
  }
}

traverse(new java.io.File("projectdir"));

EclipseLink does not support fully qualified names when persisting Java objects. For example, model.Person can be persisted with its fully qualified name in Hibernate but not in EclipseLink due to the „.“ in the name. The JPA Query Language simply hands over the query string to the JPA implementation. This can be adapted in Grails‘ gorm-jpa plugin by:

  • going to USER_HOME\.grails\1.3.7\projects\GrailsJPA3\plugins\gorm-jpa-0.7.1\src\groovy\org\grails\jpa
  • renaming JpaPluginSupport.groovy to JpaPluginSupport.groovy.back
  • editing JpaPluginSupport.groovy by renaming $entityClass.name to $entityClass.simpleName and ${entityClass.name to ${entityClass.simpleName in all queries