I want to create a one to many relationships and I\'ve used the following service.xml:
Liferay in all its version have specified documentation, that helps to move from top to bottom approach.
Please refer this first:
https://www.liferay.com/documentation/liferay-portal/6.2/development/-/ai/define-your-object-relational-map-liferay-portal-6-2-dev-guide-04-en
For spontaneous add following code
Run build-service and on successful execution you will see the getter setter methods.