Grails: tiene muchas dependencias
Frecuentes
Visto 55 equipos
0
I have two Grails classes with a hasMany dependency:
class Author {
String name
static hasMany = [books: Book]
}
I generated the controller with scaffolding its running and works. But is there a way to gernate a book within the the author controller? So there i can generate a author and some book without changing the view? Thanks in advance.
1 Respuestas
1
The built in scaffolding templates for Grails do not have this ability. However, you can use the Grails command install-templates
and modify/enhance the templates to have this ability.
Using this command the following directories and contents will be added to your project:
src
templates
artifacts
scaffolding
war
The templates within the "scaffolding" directory are where you want to make your changes/enhancements.
So, in short, no, there is no out of the box functionality for this, but you can add it on your own.
contestado el 28 de mayo de 14 a las 13:05
No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas grails has-many or haz tu propia pregunta.
Thank you for your fast reply. Is there any Grails Plugin that can solve that problem? - Eddy2Go
Nope, but you could author one! (: - Joshua Moore