Grail issue with nullable restrictions in domain class

I had the following problem with grails 1.2.1 class classes:

When I set the attr (nullable: true) restriction, and attr int or bool , this condition is not reflected in db (postgresql 8.4). However, if attr is a String , the DB is consistent with the situation.

Any clues?

thank

+3
source share
1 answer

You should use Integer and Boolean if you are using a NULL constraint.

+7
source

Source: https://habr.com/ru/post/1744550/


All Articles