If I execute this code in the Grails console:
def p = new Post(title: \"T\");
p.save(flush: true); // or p.save();
Post.count();
GORM is not t
Likely some constraint on Post
is being violated and thus the object is not being saved. Note that the default behavior of GORM is not to throw on a failed save. You need to either call it like
p.save(flush: true, failOnError: true);
Or change the behavior globally by adding
grails.gorm.failOnError=true
to your Config.groovy