Fórumok

Nyitólap » Liferay IDE » English

Kombinált nézet Egyszerű nézet Fa-nézet
Szálak [ Előző | Következő ]
toggle
Debasis Padhi
Service Builder needs to generate the SQL to create the tables
2012. május 4. 22:39
Válasz

Debasis Padhi

Rangsorolás: Junior Member

Hozzászólások: 48

Csatlakozás dátuma: 2012. március 23.

Legújabb hozzászólások

Step 1 : Create a file name as service.xml in the WEB-INF folder
Step 2 : Write the following
service.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE service-builder PUBLIC
"-//Liferay//DTD Service Builder 6.0.0//EN"
"http://www.liferay.com/dtd/liferay-service-builder_6_0_0.dtd">
<service-builder package-path="com.name.portlets.package"> <!-- as your require package structure you want -->
<namespace>servicebuilder</namespace> <!-- prefix of the table -->
<entity name="Table_Name" local-service="true" remote-service="false"> <!-- entry name is name of table -->

<column name="Column_One" type="long" primary="true" id-type="identity" /> <!--column fields in table-->
<column name="Column_Two" type="String"></column>
<column name="Column_Three" type="String"></column>

</entity>

</service-builder>
Step 3 : Start the Ant build service in build .xml of project

then it will create the tables in the database and as well as create the java code in project with respective package structure
Prakash Khanchandani
RE: Service Builder needs to generate the SQL to create the tables
2012. május 5. 4:23
Válasz

Prakash Khanchandani

Rangsorolás: Regular Member

Hozzászólások: 215

Csatlakozás dátuma: 2011. február 10.

Legújabb hozzászólások

It will create the tables only when the portlet or hook containing this service is deployed.
Hitoshi Ozawa
RE: Service Builder needs to generate the SQL to create the tables
2012. május 5. 4:36
Válasz

Hitoshi Ozawa

Rangsorolás: Liferay Legend

Hozzászólások: 8000

Csatlakozás dátuma: 2010. március 23.

Legújabb hozzászólások

then it will create the tables in the database and as well as create the java code in project with respective package structure


It will create a sql commands under the sql directory. emoticon