Additionally, if there is more than one 'text' column, creation of the table will result in "ORA-01754: a table may contain only one column of type LONG", e.g. for the following class:
class Message
{
String content
String other
static mapping = {
content type: 'text'
other type: 'text'
}
}
The correct behavior would be to create columns of type CLOB. This is not a Grails issue, because the 'text' type is passed to Hibernate and Grails relies on Hibernate in this case.
Using CLOB instead of LONG can be achieved on the application level by adding 'clob' sqlType as a workaround, like in the following example:
class Message
{
String content
String other
static mapping = {
content type: 'text', sqlType: 'clob'
other type: 'text', sqlType: 'clob'
}
}
but it's only a workaround and doesn't resolve this problem at the source.
The default behavior of Hibernate can prevent tables from being created (ORA-0175) and causes creation of tables with a deprecated column type.
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira