Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Friends Team
how to add columns in service builder
September 10, 2012 2:24 AM
Answer

Friends Team

Rank: Junior Member

Posts: 97

Join Date: September 3, 2012

Recent Posts

After deploying servive builder how to add columns in service builder...........
Rewati Raman
RE: how to add columns in service builder
September 10, 2012 2:41 AM
Answer

Rewati Raman

Rank: Junior Member

Posts: 97

Join Date: February 24, 2012

Recent Posts

Hi kumar g,

just open service.xml and add column and build service and deploy again

Regards,
Rewati Raman
Ketan Patel
RE: how to add columns in service builder
September 10, 2012 4:21 AM
Answer

Ketan Patel

Rank: Junior Member

Posts: 72

Join Date: May 4, 2012

Recent Posts

Hi Kumar g,

can you please explain what's the problem you are facing?
otherwise the suggestion given by Rewati is correct.
David H Nebinger
RE: how to add columns in service builder
September 10, 2012 9:01 AM
Answer

David H Nebinger

Community Moderator

Rank: Liferay Legend

Posts: 11478

Join Date: September 1, 2006

Recent Posts

kumar g:
After deploying servive builder how to add columns in service builder...........


You must do this manually. When a service builder entity is deployed the first time and you have the build.auto.upgrade flag to true, the entities will be created in the database.

However, there is no support for updating the database side after the initial deployment. You must do this yourself.

You could go the Liferay route for automatic upgrades, but most of the time I find this to be overkill, especially if it is not something that you're going to throw into the marketplace, for example.

Just use your sql tool to make the changes to be in sync with the entity changes you're making in service builder and continue with your forward development.

Alternatively you could use the expando stuff to add attributes after the fact, but I tend to avoid this for business entities. I think it's okay to use this to extend Liferay entities (it's their entity you're extending), but would want to avoid mixing my data w/ Liferay's data as much as possible.

But the choice is yours...
Harish Kumar
RE: how to add columns in service builder
September 10, 2012 10:05 AM
Answer

Harish Kumar

Rank: Expert

Posts: 473

Join Date: July 31, 2010

Recent Posts

Hi David,

1
2However, there is no support for updating the database side after the initial deployment. You must do this yourself.
3
4You could go the Liferay route for automatic upgrades, but most of the time I find this to be overkill, especially if it is not something that you're going to throw into the marketplace,


I've done this entity extension with Liferay 6.1EE GA1 and it was quite smooth.
Friends Team
RE: how to add columns in service builder
October 30, 2012 10:33 PM
Answer

Friends Team

Rank: Junior Member

Posts: 97

Join Date: September 3, 2012

Recent Posts

hi thanks for reply but once deloy the service .xml how can we add columns ?
Gaurav Jain
RE: how to add columns in service builder
October 30, 2012 10:39 PM
Answer

Gaurav Jain

Rank: Regular Member

Posts: 146

Join Date: January 31, 2011

Recent Posts

kumar g:
hi thanks for reply but once deploy the service.xml how can we add columns ?


Liferay manages the changes in service.xml with some properties like build number and build date. And new changes made in it, will be checked by liferay whenever you will rebuild your service and redeploy it and accordingly it will update db table as needed/changed in your service.xml
Harish Kumar
RE: how to add columns in service builder
October 30, 2012 10:41 PM
Answer

Harish Kumar

Rank: Expert

Posts: 473

Join Date: July 31, 2010

Recent Posts

as Rewati said just open service.xml and add column and build service and deploy again
Friends Team
RE: how to add columns in service builder
October 30, 2012 10:43 PM
Answer

Friends Team

Rank: Junior Member

Posts: 97

Join Date: September 3, 2012

Recent Posts

build.auto.upgrade flag to true, this flag where it is getting plz guide me
Jitendra Rajput
RE: how to add columns in service builder
October 30, 2012 11:09 PM
Answer

Jitendra Rajput

Rank: Liferay Master

Posts: 858

Join Date: January 7, 2011

Recent Posts

Check your service.properties file to change build.auto/upgrade property.