Spring roo - 添加CLOB字段 [英] Spring roo - adding CLOB field
问题描述
在我的Web应用程序中,我将一些Text消息保存在DB表(Oracle)的COLUMN中。早期的VARCHAR2长度(最大长度)是(500 BYTE)。现在最大长度增加到4000个字符。所以我需要在我的域类中添加一个'CLOB'字段。
任何人都可以澄清为了在我的域类中创建CLOB字段需要遵循的步骤。我的数据库中也有CLOB cloumn。
(开始的命令/语法是什么?)
In my web application, I am saving some Text message in a COLUMN of a DB table(Oracle). Earlier the VARCHAR2 length(maximum length) is (500 BYTE). Now the maximum length is increased to 4000 characters. So I need to add a 'CLOB' field in my domain class.
Can anyone please clarify what are the steps need to be followed in order to create a CLOB field in my domain class. I also have CLOB cloumn in my DB.
(What is the command/syntax to start with?)
推荐答案
在数据库中添加CLOB
Adding CLOB at database
并在域类中添加以下代码是解决方案。
and adding the below code in the domain class is the solution.
@Lob
private String message;
这篇关于Spring roo - 添加CLOB字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!