Message Boards
One To Many Relationship in Liferay 6.2
Varun Arya, modified 7 Years ago.
One To Many Relationship in Liferay 6.2
New Member Posts: 24 Join Date: 3/2/17 Recent Posts
I have two entites in my service builder:
I want to create a foreign key (relationship) of my first table in second table. Service builder is built successfully.
But i am not getting setter and getter to store borrowConsoleParameters in BorrowConsoleParametersMapping table(like hibernate).
I dont want another table to maintain the relationship.
Please Help..
<entity name="BorrowConsoleParameters" local-service="true" remote-service="true">
<column name="borrowConsoleParametersId" type="long" primary="true" />
<column name="parameterName" type="String" />
<column name="isActive" type="String" />
<column name="dateCreated" type="Date" />
<finder name="ParameterName" return-type="Collection">
<finder-column name="parameterName" />
</finder>
</entity>
<entity name="BorrowConsoleParametersMapping" local-service="true" remote-service="true">
<column name="borrowConsoleParametersMappingId" type="long" primary="true" />
<column name="srn" type="String" />
<column name="borrowConsoleParameters" type="Collection" entity="BorrowConsoleParameters" />
<column name="isActive" type="String" />
<column name="modifiedBy" type="long" />
<column name="dateModified" type="Date" />
</entity>
I want to create a foreign key (relationship) of my first table in second table. Service builder is built successfully.
But i am not getting setter and getter to store borrowConsoleParameters in BorrowConsoleParametersMapping table(like hibernate).
I dont want another table to maintain the relationship.
Please Help..