If I have domain classes like:
class A {
short aCode
//...
static hasMany = [bs : B]
static mapping = {
id column: 'a_code' name: 'aCode'
}
}
class B {
long bCode
static belongsTo = [a: A]
id column: 'b_code' name: 'bCode'
}
And try to use the B class in a command:
class SomeCommand {
List<B> bs = ListUtils.lazyList( [], FactoryUtils.instantiateFactory(B) )
}
My input for aCode should be:
<input type='text' name='bs[0].a.aCode' />
Why this is not binded by grails controller? command.bs[0].a stays null after binding.
I’m using Grails 2.0.3
Actually the data binding with command objects and Lists does not work. There’s a JIRA for this.