I have Message domain class that is used to send an email to site administrators
class Message {
String name
String subject
String body
}
I thought String would not have a maximum size but when people put in messages that are too big then I see exceptions in my log files. For now I put a constraint in to limit the size of the message to 250 but cannot make it bigger or else the save fails. I am using PostgreSQL 9.1.1 and Grails 1.3.7. Does anyone know a way to fix this?
You can specify the data type using a constraint:
static constraints = {
body type:'text'
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With