Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-4383

ServiceBuilder -- compile error on composite keys when joining entities

    Details

      Description

      If one was to generate the code below. two failures occur.
      1. In the compilation during service-build
      2. Once one goes around this issue, the finder method will fail when search on just one element in the primary key

      see sample below:
      <entity name="userFood" local-service="true" remote-service="false"
      table="userfood">
      <!-- PK fields -->
      <column name="userId" type="long" primary="true"/>
      <column name="foodId" type="long" primary="true"/>
      </entity>

      <entity name="usertable" local-service="true" remote-service="false"
      table="tablea">
      <!-- PK fields -->
      <column name="userId" type="long" primary="true"/>
      <column name="tableId" type="long" primary="true"/>

      <column name="frequency" type="String" />

      <column name="foods" type="Collection" entity="userFood" mapping-key="userId"/>
      </entity>

      Please contact me if you need more informaiton

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                8 years, 49 weeks, 5 days ago