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

            Assignee:
            support-lep@liferay.com SE Support
            Reporter:
            atul.ducati@gmail.com atul patel (Inactive)
            Participants of an Issue:
            Recent user:
            Esther Sanz
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              10 years, 19 weeks, 6 days ago

                Packages

                Version Package