Forums

Home » Liferay Sync

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
sanchita dutta
what's the problom in this code in service builder?Every time build failed.
June 25, 2012 1:54 AM
Answer

sanchita dutta

Rank: New Member

Posts: 8

Join Date: February 20, 2012

Recent Posts


<?xml version="1.0"?>
<!DOCTYPE service-builder PUBLIC
"-//Liferay//DTD Service Builder 6.1.0//EN"
"http://www.liferay.com/dtd/liferay-service-builder_6_1_0.dtd">
<service-builder package-path="com.test">
<author>Sanchita Dutta</author>
<namespace>FED</namespace>


<entity name="T_Category_Master" local-service="true" remote-service="false">
<!-- Group instance -->

<column name="groupId" type="long" />

<!-- Audit fields -->

<column name="companyId" type="long" />

<column name="Category_ID" type="int" primary="true" id-type="identity"/>
<column name="Category_Name" type="String" />


</entity>



<entity name="T_Product_Master" local-service="true" remote-service="false">

<column
name="Category_ID"
type="Collection"
entity="T_Category_Master"
mapping-key="Category_ID" />

<!-- Group instance -->

<column name="groupId" type="long" />

<!-- Audit fields-->

<column name="companyId" type="long" />

<column name="Category_ID" type="int" />
<column name="Product_ID" type="int" primary="true" id-type="identity"/>
<column name="Product_Name" type="String" />
<finder name="CategoryID" return-type="Collection">
<finder-column name="Category_ID" />
</finder>
</entity>



<entity name="T_Specification" local-service="true" remote-service="false">
<column
name="Product_ID"
type="Collection"
entity="T_Product_Master"
mapping-key="Product_ID" />
<!-- Group instance -->

<column name="groupId" type="long" />

<!-- Audit fields -->

<column name="companyId" type="long" />
<column name="Spec_ID" type="int" primary="true" id-type="identity"/>
<column name="Spaec_Name" type="String" />
<column name="Product_ID" type="int" />
<column name="Value" type="String" />
<finder name="ProductID" return-type="Collection">
<finder-column name="Product_ID" />
</finder>
</entity>


</service-builder>



Amos Fong
RE: what's the problom in this code in service builder?Every time build fai
June 25, 2012 2:30 AM
Answer

Amos Fong

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1912

Join Date: October 7, 2008

Recent Posts

Hi,

What's the error you're getting? Also I assume you're on 6.1?
Sandeep Nair
RE: what's the problom in this code in service builder?Every time build fai
June 25, 2012 2:44 AM
Answer

Sandeep Nair

Rank: Liferay Legend

Posts: 1721

Join Date: November 5, 2008

Recent Posts

Its very hard to tell what is the problem unless you show us what error you are getting.

But from the looks of service.xml it seems the error may very well be because of teh way you have defined the columns. Make sure the column names follow javabean specification. For example Category_ID should be categoryId

Your column definition below looks very dodgy too

1<column
2name="Product_ID"
3type="Collection"
4entity="T_Product_Master"
5mapping-key="Product_ID" />