Foros de discusión

adding new column to the service.xml deletes entries from existing table

kavitha pazhanee, modificado hace 12 años.

adding new column to the service.xml deletes entries from existing table

New Member Mensajes: 11 Fecha de incorporación: 11/08/11 Mensajes recientes
Hi all,
I have a plugin portlet which is connecting to a userdefined table in liferay database. Now i need to add a new column to the existing database.
i tried to define the column by
putting the following entries in service.xml
<column name="fundingFlag" type="String"/>
and a finder method as below
<finder name="FundingFlag" return-type="Collection">
<finder-column name="fundingFlag"/>
</finder>


then i ran the ant script, it built its own impl methods successfully and a war file was created.
But when i try to deploy the war file, the new column is created successfully in the database table, but the existing rows in the table is deleted.

Can anyone please help me to add the column to a table without overwriting the existing one.

i am using tomcat 5.2.3 with eclipse 3.5

Regards,
kavitha
thumbnail
Prakash Khanchandani, modificado hace 12 años.

RE: adding new column to the service.xml deletes entries from existing tabl

Expert Mensajes: 329 Fecha de incorporación: 10/02/11 Mensajes recientes
In my case it didn't delete the other rows in the table, it just altered the table to add the required columns. Which is ideally and normally the case.

I m using Liferay 6.0 and MySQL or Oracle database. which version of liferay & database are you using?
kavitha pazhanee, modificado hace 12 años.

RE: adding new column to the service.xml deletes entries from existing tabl

New Member Mensajes: 11 Fecha de incorporación: 11/08/11 Mensajes recientes
i am using liferay 5.2.3 with mysql as the db.

Regards,
kavitha
thumbnail
Jitendra Rajput, modificado hace 12 años.

RE: adding new column to the service.xml deletes entries from existing tabl

Liferay Master Mensajes: 875 Fecha de incorporación: 7/01/11 Mensajes recientes
After successful build service analyze tables.sql ...and check create table query
kavitha pazhanee, modificado hace 12 años.

RE: adding new column to the service.xml deletes entries from existing tabl

New Member Mensajes: 11 Fecha de incorporación: 11/08/11 Mensajes recientes
it looks to be a normal create table query with a new column added as what i created.
kavitha pazhanee, modificado hace 12 años.

RE: adding new column to the service.xml deletes entries from existing tabl

New Member Mensajes: 11 Fecha de incorporación: 11/08/11 Mensajes recientes
can anyone help me in solving this issue please