[英]Grails problem with nullable contraint in domain class
I'm having the following problem with grails' 1.2.1 domain classes: 我在grails的1.2.1域类中遇到以下问题:
When I set a constraint attr(nullable:true) and attr is int or bool , this condition isn't reflected in the db (postgresql 8.4). 当我设置约束attr(nullable:true)并且attr是int或bool时 ,这个条件不会反映在db(postgresql 8.4)中。 However, if attr is a String , the DB is consistent with the situation.
但是,如果attr是String ,则DB与情况一致。
Any hints ? 任何提示?
Thanks 谢谢
如果使用可空约束,则应使用Integer和Boolean。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.