KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
In a Grails domain class, how do I set the constraint for a String field so that its MySQL column type is TEXT or LONGTEXT? So far my best approach is to set the constraint's size: myTextField(size:0..65535) which results in TEXT myTextField(size:0..2147483646) results in LONGTEXT (2147483646 = 2^32 / 2 - 1 - 1) Is there a cleaner way to specify the size? Basically I want the full range of TEXT or LONGTEXT without having to hardcode a bunch of size values.
Tags (comma-separated)
Save Edits
Cancel