Quantcast

Adding constraints to nested command object throws ClassCastException

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Adding constraints to nested command object throws ClassCastException

zlegein
In regards to this issue that has been closed.

http://jira.codehaus.org/browse/GRAILS-1620

How do i add constraints to the nested class.

so for example, if i wanted to do

class SomeCommand {
String whatever
Name name = new Name()
}

class Name {
Integer x
Integer y

static constraints = {
x(blank:false),
y(blank:false)
}
}

This fails with a ClassCastException due to adding the constraints to the nested object. Is this a bug?


Loading...