One to Many Relationship in liferay using service bulider
Sometimes It is required to set relationship in liferay through the service.xml
<entity name="Parent" local-service="true" remote-service="false">
<column name="ParentId" type="long" primary="true" />
<column name="childReference" type="Collection" entity="ChildReference" mapping-key="ChildId" />
-------------------
-------------------
</entity>
<entity name="Child" local-service="true" remote-service="false">
<column name="ChildId" type="long" primary="true" />
-------------------
-------------------
</entity>
Thats it you have set one-to-many relationship
Then build your service , to see the auto generated classes
Refer the ParentUtil class to see the mapping classes .
This is a great inspiring article.I am pretty much pleased with your good work.You put really very helpful information..
ReplyDeleteMobile Application Development Training in Chennai