Open indoos opened 14 years ago
Possible solution with scripts/_Events.groovy:
/** * Make generate-* work */ def doinGenerateAction = false // hacky hack def tweakForGenerate = { doinGenerateAction = true } // use following two events to mark that we are currently generating eventUberGenerateStart = tweakForGenerate eventGenerateForOneStart = tweakForGenerate /** * register artefacts as Domains here, so that we are modifying the same * grailsApp that is used to find domainClasses for generation */ eventConfigureAppEnd = { if (doinGenerateAction) { grailsApp.CouchDomainClasses.each { grailsApp.addArtefact(DomainClassArtefactHandler.TYPE, it) } } }
generate-all is currently not generating the views/controller for domain classes with @CouchEntity. You can use generate-all only after commenting out @CouchEntity. The javascript CouchDB views then need to be manually created. It would be good to have generate-all generate the scaffold including the javascripts.
Also, could not get dynamic finders working. I could only run existing finders/list for javascript queries alerady existing in couchdb
env- grails 1.1.1, trip-planner download
BTW, great work!!