No difference between nullable:true and nullable:false in Grails 1.3.6?
- by knorv
The following domain model definition ..
class Test {
String a
String b
static mapping = {
version(false)
table("test_table")
a(nullable: false)
b(nullable: true)
}
}
.. yields the following MySQL schema ..
CREATE TABLE test_table (
id bigint(20) NOT NULL AUTO_INCREMENT,
a varchar(255) NOT NULL,
b varchar(255) NOT NULL,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Please note that a and b get identical MySQL column definitions despite the fact a is defined as non-nullable and b is nullable in the GORM mappings.
What am I doing wrong? I'm running Grails 1.3.6.