本を追加/更新/削除し、著者を追加できるポートレットがあります。さらに、本を追加しようとすると、既存の著者を選択できます。
次に、各著者が何冊の本を書いたかを「著者」テーブルに表示する必要があります。どうすればいいですか?私はliferayの初心者で、まったくわかりません。
それは私のservice.xmlです
<entity name="Book" local-service="true" remote-service="true" cache-enabled="false">
<column name="bookId" type="long" primary="true" />
<column name="bookName" type="String" />
<column name="bookDescription" type="String" />
<column name="authors" type="Collection" entity="Author" mapping-table="Books_Authors" />
<finder return-type="Collection" name="bookName">
<finder-column name="bookName"></finder-column>
</finder>
</entity>
<entity name="Author" local-service="true" remote-service="true" cache-enabled="false">
<column name="authorId" type="long" primary="true" />
<column name="authorName" type="String" />
<column name="books" type="Collection" entity="Book" mapping-table="Books_Authors" />
</entity>