Foros de discusión
Re:How to Customize DB Column Size in Plugin
venka reddy, modificado hace 11 años.
Re:How to Customize DB Column Size in Plugin
Regular Member Mensajes: 231 Fecha de incorporación: 23/03/11 Mensajes recientes
Hi ,
How can we Customize column size in Plugin? , I have read a documentation, we can modify column size in EXT at Portal-model-hints.xml.
How can we Customize column size in Plugin? , I have read a documentation, we can modify column size in EXT at Portal-model-hints.xml.
jelmer kuperus, modificado hace 11 años.
RE: Re:How to Customize DB Column Size in Plugin
Liferay Legend Mensajes: 1191 Fecha de incorporación: 10/03/10 Mensajes recientes
It works the same way for portlets, you edit : docroot/WEB-INF/src/META-INF/portlet-model-hints.xml after you have run ant build-service
venka reddy, modificado hace 11 años.
RE: Re:How to Customize DB Column Size in Plugin
Regular Member Mensajes: 231 Fecha de incorporación: 23/03/11 Mensajes recientes
hi jelmer,
Thanks for your reply
I have modified portlet-model-hints.xml as below.
<model-hints>
<hint-collection name="CLOB">
<hint name="max-length">2000000</hint>
</hint-collection>
<model name="xxxxxxxxxx">
<field name="Content" type="String" >
<hint-collection name="CLOB" />
</field>
I have noticed It is updated in tables.sql as ,
content TEXT null,
But is not updated in DB still content type is VARCHAR
Thanks for your reply
I have modified portlet-model-hints.xml as below.
<model-hints>
<hint-collection name="CLOB">
<hint name="max-length">2000000</hint>
</hint-collection>
<model name="xxxxxxxxxx">
<field name="Content" type="String" >
<hint-collection name="CLOB" />
</field>
I have noticed It is updated in tables.sql as ,
content TEXT null,
But is not updated in DB still content type is VARCHAR
Jitendra Rajput, modificado hace 11 años.
RE: Re:How to Customize DB Column Size in Plugin
Liferay Master Mensajes: 875 Fecha de incorporación: 7/01/11 Mensajes recientes
check this
http://itsliferay.blogspot.in/2012/03/customize-database-column-size.html
http://itsliferay.blogspot.in/2012/03/customize-database-column-size.html
venka reddy, modificado hace 11 años.
RE: Re:How to Customize DB Column Size in Plugin
Regular Member Mensajes: 231 Fecha de incorporación: 23/03/11 Mensajes recientes
Hi Jitendra,
I have gone through your link and same steps i have implemented in my plugin.
But not reflected in my DB , Still it shows its DATATYPE is VARCHAR.
I think once table is added with column type varchar , it cannot update to TEXT.
Is my guess correct?
I have gone through your link and same steps i have implemented in my plugin.
But not reflected in my DB , Still it shows its DATATYPE is VARCHAR.
I think once table is added with column type varchar , it cannot update to TEXT.
Is my guess correct?
Chintan Akhani, modificado hace 11 años.
RE: Re:How to Customize DB Column Size in Plugin
Regular Member Mensajes: 111 Fecha de incorporación: 13/03/08 Mensajes recientes
If you want to change the datatype than you have to do that change in service.xml first, and than you need to do ant build service again.
Jitendra Rajput, modificado hace 11 años.
RE: Re:How to Customize DB Column Size in Plugin
Liferay Master Mensajes: 875 Fecha de incorporación: 7/01/11 Mensajes recientes
First of check if your changes are getting reflected or not . Verify from your log is that any BuildNumber error if so then you database changes wont be reflected.
venka reddy, modificado hace 11 años.
RE: Re:How to Customize DB Column Size in Plugin
Regular Member Mensajes: 231 Fecha de incorporación: 23/03/11 Mensajes recientes
Hi,
My Service .properties as follows
include-and-override=service-ext.properties
build.namespace=Sample
build.number=486
build.date=1338904122042
build.auto.upgrade=true
spring.configs=\
WEB-INF/classes/META-INF/base-spring.xml,\
\
WEB-INF/classes/META-INF/hibernate-spring.xml,\
WEB-INF/classes/META-INF/infrastructure-spring.xml,\
\
WEB-INF/classes/META-INF/cluster-spring.xml,\
\
WEB-INF/classes/META-INF/portlet-spring.xml,\
\
WEB-INF/classes/META-INF/dynamic-data-source-spring.xml,\
WEB-INF/classes/META-INF/shard-data-source-spring.xml,\
\
WEB-INF/classes/META-INF/ext-spring.xml
and my servicecomponent table is
11501, 'Sample', 485, 1335936754156,
By observing this , i think it will not generate BuildNumber error
My Service .properties as follows
include-and-override=service-ext.properties
build.namespace=Sample
build.number=486
build.date=1338904122042
build.auto.upgrade=true
spring.configs=\
WEB-INF/classes/META-INF/base-spring.xml,\
\
WEB-INF/classes/META-INF/hibernate-spring.xml,\
WEB-INF/classes/META-INF/infrastructure-spring.xml,\
\
WEB-INF/classes/META-INF/cluster-spring.xml,\
\
WEB-INF/classes/META-INF/portlet-spring.xml,\
\
WEB-INF/classes/META-INF/dynamic-data-source-spring.xml,\
WEB-INF/classes/META-INF/shard-data-source-spring.xml,\
\
WEB-INF/classes/META-INF/ext-spring.xml
and my servicecomponent table is
11501, 'Sample', 485, 1335936754156,
By observing this , i think it will not generate BuildNumber error
Riccardo Ferrari, modificado hace 11 años.
RE: Re:How to Customize DB Column Size in Plugin
Regular Member Mensajes: 139 Fecha de incorporación: 13/11/10 Mensajes recientes
Hi,
I am not sure that LR is able to update an already deployed schema. Can you try to drop the table and deploy the service again? (you have to run a service-build task before deploying it)
Which LR are you running?
Regards,
Riccardo
I am not sure that LR is able to update an already deployed schema. Can you try to drop the table and deploy the service again? (you have to run a service-build task before deploying it)
Which LR are you running?
Regards,
Riccardo
Alexandre FILLATRE, modificado hace 11 años.
RE: Re:How to Customize DB Column Size in Plugin
Junior Member Mensajes: 80 Fecha de incorporación: 2/12/10 Mensajes recientesRiccardo Ferrari:
Hi,
I am not sure that LR is able to update an already deployed schema. Can you try to drop the table and deploy the service again? (you have to run a service-build task before deploying it)
Which LR are you running?
Regards,
Riccardo
Liferay should be able to handle that. This might be a regression (to check). I'm familiar with the process describe in the second post, and it looks right to me.
@venka : Can you try to add a field in your entity, build the service again, and re-deploy your plugin to see if it works that way ?
Regards,
Alexandre FILLATRE
Riccardo Ferrari, modificado hace 11 años.
RE: Re:How to Customize DB Column Size in Plugin
Regular Member Mensajes: 139 Fecha de incorporación: 13/11/10 Mensajes recientes
I had previous experience on LR 5.2.2 CE not being able to update the schema. Thats why I was asking about the LR version.
Regards,
Riccardo
Regards,
Riccardo
venka reddy, modificado hace 11 años.
RE: Re:How to Customize DB Column Size in Plugin
Regular Member Mensajes: 231 Fecha de incorporación: 23/03/11 Mensajes recientes
Hi Alexandre FILLATRE,
I am using LR 6.0.5
As you have suggested, i have changed as below
portlet-models-hints.xml
<model-hints>
<hint-collection name="CLOB">
<hint name="max-length">2000000</hint>
</hint-collection>
<model name="xxxxxxxxxx">
<field name="Content" type="String" >
<hint-collection name="CLOB" />
</field>
Modified portlet-models-hints.xml
<model-hints>
<hint-collection name="CLOB">
<hint name="max-length">2000000</hint>
</hint-collection>
<model name="xxxxxxxxxx">
<field name="description" type="String" >
<hint-collection name="CLOB" />
</field>
<field name="Content" type="String" >
<hint-collection name="CLOB" />
</field>
tables.SQL
title TEXT null,
description TEXT null,
I have built the service and deploy the portlet no changes In DB , Still my "description" DATATYPE is VARCHAR
I am using LR 6.0.5
As you have suggested, i have changed as below
portlet-models-hints.xml
<model-hints>
<hint-collection name="CLOB">
<hint name="max-length">2000000</hint>
</hint-collection>
<model name="xxxxxxxxxx">
<field name="Content" type="String" >
<hint-collection name="CLOB" />
</field>
Modified portlet-models-hints.xml
<model-hints>
<hint-collection name="CLOB">
<hint name="max-length">2000000</hint>
</hint-collection>
<model name="xxxxxxxxxx">
<field name="description" type="String" >
<hint-collection name="CLOB" />
</field>
<field name="Content" type="String" >
<hint-collection name="CLOB" />
</field>
tables.SQL
title TEXT null,
description TEXT null,
I have built the service and deploy the portlet no changes In DB , Still my "description" DATATYPE is VARCHAR
Jitendra Rajput, modificado hace 11 años.
RE: Re:How to Customize DB Column Size in Plugin
Liferay Master Mensajes: 875 Fecha de incorporación: 7/01/11 Mensajes recientes
Have you tried by restarting your application server ?
venka reddy, modificado hace 11 años.
RE: Re:How to Customize DB Column Size in Plugin
Regular Member Mensajes: 231 Fecha de incorporación: 23/03/11 Mensajes recientes
Hi,
got!!! when i restart the server, Columns get updated
got!!! when i restart the server, Columns get updated